FBSDKErrorRecoveryAttempting
A more recent version of this class is available. Check out the latest version.

A formal protocol very similar to the informal protocol NSErrorRecoveryAttempting

Extends Protocol:NSObject
Declared in:FBSDKErrorRecoveryAttempting.h
Instance Methods
attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:

Attempt the recovery

ParameterDescription
error

The error

recoveryOptionIndex

The selected option index

delegate

The delegate

didRecoverSelector

The callback selector, see discussion.

contextInfo

Context info to pass back to callback selector, see discussion.

- (void)
attemptRecoveryFromError: (NSError *)error
optionIndex: (NSUInteger)recoveryOptionIndex
delegate: (id)delegate
didRecoverSelector: (SEL)didRecoverSelector
contextInfo: (void*)contextInfo;
Discussion:

Given that an error alert has been presented document-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and send the selected message to the specified delegate. The option index is an index into the error's array of localized recovery options. The method selected by didRecoverSelector must have the same signature as:

  • (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo;

The value passed for didRecover must be YES if error recovery was completely successful, NO otherwise.

Constants
FBSDKErrorArgumentCollectionKey
FBSDK_EXTER N NSString *const FBSDKErrorArgumentCollectionKey;
Discussion:

If the invalid argument is a collection, the collection can be found with this key and the individual invalid item can be found with FBSDKErrorArgumentValueKey.

FBSDKErrorArgumentNameKey
FBSDK_EXTER N NSString *const FBSDKErrorArgumentNameKey;
FBSDKErrorArgumentValueKey
FBSDK_EXTER N NSString *const FBSDKErrorArgumentValueKey;
FBSDKErrorDeveloperMessageKey
FBSDK_EXTER N NSString *const FBSDKErrorDeveloperMessageKey;
Discussion:

The developer message will not be localized and is not intended to be presented within the app.

FBSDKErrorDomain
FBSDK_EXTER N NSString *const FBSDKErrorDomain;
Discussion:

Error codes from the SDK in the range 0-99 are reserved for this domain.

FBSDKErrorLocalizedDescriptionKey
FBSDK_EXTER N NSString *const FBSDKErrorLocalizedDescriptionKey;
FBSDKErrorLocalizedTitleKey
FBSDK_EXTER N NSString *const FBSDKErrorLocalizedTitleKey;
FBSDKGraphRequestErrorCategoryKey
FBSDK_EXTER N NSString *const FBSDKGraphRequestErrorCategoryKey;
Discussion:

See FBSDKGraphErrorRecoveryProcessor and [FBSDKGraphRequest disableErrorRecovery].

Typedefs
NS_ENUM

Indicates an operation failed because a required access token was not found.

typedef NS_ENUM(NSInteger, FBSDKErrorCode) {
FBSDKReservedErrorCode = 0,
FBSDKEncryptionErrorCode,
FBSDKInvalidArgumentErrorCode,
FBSDKUnknownErrorCode,
FBSDKNetworkErrorCode,
FBSDKAppEventsFlushErrorCode,
FBSDKGraphRequestNonTextMimeTypeReturnedErrorCode,
FBSDKGraphRequestProtocolMismatchErrorCode,
FBSDKGraphRequestGraphAPIErrorCode,
FBSDKDialogUnavailableErrorCode,
FBSDKAccessTokenRequiredErrorCode,
};
Discussion:

This error may signify that the configuration for the dialogs has not yet been downloaded from the server or that the dialog is unavailable. Subsequent attempts to use the dialog may succeed as the configuration is loaded.

NS_ENUM

Describes the category of Facebook error. See FBSDKGraphRequestErrorCategoryKey.

typedef NS_ENUM(NSUInteger, FBSDKGraphRequestErrorCategory) {
FBSDKGraphRequestErrorCategoryOther = 0,
FBSDKGraphRequestErrorCategoryTransient = 1,
FBSDKGraphRequestErrorCategoryRecoverable = 2
};
ConstantDescription
FBSDKGraphRequestErrorCategoryOther

The default error category that is not known to be recoverable. Check FBSDKLocalizedErrorDescriptionKey for a user facing message.

FBSDKGraphRequestErrorCategoryTransient

Indicates the error is temporary (such as server throttling). While a recoveryAttempter will be provided with the error instance, the attempt is guaranteed to succeed so you can simply retry the operation if you do not want to present an alert.

FBSDKGraphRequestErrorCategoryRecoverable

Indicates the error can be recovered (such as requiring a login). A recoveryAttempter will be provided with the error instance that can take UI action.

Discussion:

FBSDKGraphRequestErrorCategory)

NS_ENUM(NSInteger, FBSDKErrorCode)

Indicates an operation failed because a required access token was not found.

typedef NS_ENUM(NSInteger, FBSDKErrorCode) {
FBSDKReservedErrorCode = 0,
FBSDKEncryptionErrorCode,
FBSDKInvalidArgumentErrorCode,
FBSDKUnknownErrorCode,
FBSDKNetworkErrorCode,
FBSDKAppEventsFlushErrorCode,
FBSDKGraphRequestNonTextMimeTypeReturnedErrorCode,
FBSDKGraphRequestProtocolMismatchErrorCode,
FBSDKGraphRequestGraphAPIErrorCode,
FBSDKDialogUnavailableErrorCode,
FBSDKAccessTokenRequiredErrorCode,
};
Discussion:

This error may signify that the configuration for the dialogs has not yet been downloaded from the server or that the dialog is unavailable. Subsequent attempts to use the dialog may succeed as the configuration is loaded.

NS_ENUM(NSUInteger,

Describes the category of Facebook error. See FBSDKGraphRequestErrorCategoryKey.

typedef NS_ENUM(NSUInteger, FBSDKGraphRequestErrorCategory) {
FBSDKGraphRequestErrorCategoryOther = 0,
FBSDKGraphRequestErrorCategoryTransient = 1,
FBSDKGraphRequestErrorCategoryRecoverable = 2
};
ConstantDescription
FBSDKGraphRequestErrorCategoryOther

The default error category that is not known to be recoverable. Check FBSDKLocalizedErrorDescriptionKey for a user facing message.

FBSDKGraphRequestErrorCategoryTransient

Indicates the error is temporary (such as server throttling). While a recoveryAttempter will be provided with the error instance, the attempt is guaranteed to succeed so you can simply retry the operation if you do not want to present an alert.

FBSDKGraphRequestErrorCategoryRecoverable

Indicates the error can be recovered (such as requiring a login). A recoveryAttempter will be provided with the error instance that can take UI action.

Discussion:

FBSDKGraphRequestErrorCategory)