FBError
This class is no longer available in the most recent version of the SDK.
A more recent version of this class is available. Check out the latest version.
Constants
FacebookNativeApplicationDomain
FBSDK_EXTER N NSString *const FacebookNativeApplicationDomain;
Discussion:

The NSError domain of all errors surfaced by the Facebook SDK that were returned by the Facebook Application

Declared In: FBError.h
FacebookSDKDomain
FBSDK_EXTER N NSString *const FacebookSDKDomain;
Discussion:

The NSError domain of all errors returned by the Facebook SDK.

Declared In: FBError.h
FBErrorAppEventsReasonKey
FBSDK_EXTER N NSString *const FBErrorAppEventsReasonKey;
Discussion:

The key in the userInfo NSDictionary of NSError for errors encountered with FBAppEvents operations (error.code equals FBErrorAppEvents).

Declared In: FBError.h
FBErrorDialogCantBeDisplayed
FBSDK_EXTER N NSString *const FBErrorDialogCantBeDisplayed;
Discussion:

A value that may appear in the NSError userInfo dictionary under the FBErrorDialogReasonKey key. Indicates that a native dialog cannot be displayed for some other reason.

Declared In: FBError.h
FBErrorDialogInvalidForSession
FBSDK_EXTER N NSString *const FBErrorDialogInvalidForSession;
Discussion:

A value that may appear in the NSError userInfo dictionary under the FBErrorDialogReasonKey key. Indicates that a native dialog cannot be displayed because it is not appropriate for the current session.

Declared In: FBError.h
FBErrorDialogInvalidLikeObjectID
FBSDK_EXTER N NSString *const FBErrorDialogInvalidLikeObjectID;
Discussion:

A value that may appear in the NSError userInfo ditionary under the FBErrorDialogReasonKey key. Indicates that a like dialog cannot be displayed because the objectID parameter value is invalid.

Declared In: FBError.h
FBErrorDialogInvalidOpenGraphActionParameters
FBSDK_EXTER N NSString *const FBErrorDialogInvalidOpenGraphActionParameters;
Discussion:

A value that may appear in the NSError userInfo ditionary under the FBErrorDialogReasonKey key. Indicates that a native dialog cannot be displayed because the parameters for sharing an Open Graph action were not configured. The parameters must include an 'action', 'actionType', and 'previewPropertyName'.

Declared In: FBError.h
FBErrorDialogInvalidOpenGraphObject
FBSDK_EXTER N NSString *const FBErrorDialogInvalidOpenGraphObject;
Discussion:

A value that may appear in the NSError userInfo ditionary under the FBErrorDialogReasonKey key. Indicates that a native dialog cannot be displayed because an Open Graph object that was passed was not configured correctly. The object must either (a) exist by having an 'id' or 'url' value; or, (b) configured for creation (by setting the 'type' value and provisionedForPost property)

Declared In: FBError.h
FBErrorDialogInvalidShareParameters
FBSDK_EXTER N NSString *const FBErrorDialogInvalidShareParameters;
Discussion:

A value that may appear in the NSError userInfo ditionary under the FBErrorDialogReasonKey key. Indicates that a native dialog cannot be displayed because the parameters for sharing a status update, link, or photo were not configured. The parameters must not include both 'photos' and a 'link'.

Declared In: FBError.h
FBErrorDialogNotSupported
FBSDK_EXTER N NSString *const FBErrorDialogNotSupported;
Discussion:

A value that may appear in the NSError userInfo dictionary under the FBErrorDialogReasonKey key. Indicates that a native dialog is not supported in the current OS.

Declared In: FBError.h
FBErrorDialogReasonKey
FBSDK_EXTER N NSString *const FBErrorDialogReasonKey;
Discussion:

The key in the userInfo NSDictionary of NSError for errors encountered with FBDialogs operations. (error.code equals FBErrorDialog). If present, the value will be one of the constants prefixed by FBErrorDialog *.

Declared In: FBError.h
FBErrorHTTPStatusCodeKey
FBSDK_EXTER N NSString *const FBErrorHTTPStatusCodeKey;
Discussion:

The key in the userInfo NSDictionary of NSError indicating the HTTP status code of the response (if any).

Declared In: FBError.h
FBErrorInnerErrorKey
FBSDK_EXTER N NSString *const FBErrorInnerErrorKey;
Discussion:

The key in the userInfo NSDictionary of NSError where you can find the inner NSError (if any).

Declared In: FBError.h
FBErrorInnerErrorKey
FBSDK_EXTER N NSString *const FBErrorInnerErrorKey;
Discussion:

The key in the userInfo NSDictionary of NSError where you can find the inner NSError (if any).

Declared In: FBError.h
FBErrorLoginFailedOriginalErrorCode
FBSDK_EXTER N NSString *const FBErrorLoginFailedOriginalErrorCode;
Discussion:

The key in the userInfo NSDictionary of NSError for unsuccessful logins (error.code equals FBErrorLoginFailedOrCancelled). If present, the value indicates an original login error code wrapped by this error. This is only used in the web dialog login flow.

Declared In: FBError.h
FBErrorLoginFailedReason
FBSDK_EXTER N NSString *const FBErrorLoginFailedReason;
Discussion:

The key in the userInfo NSDictionary of NSError for unsuccessful logins (error.code equals FBErrorLoginFailedOrCancelled). If present, the value will be one of the constants prefixed by FBErrorLoginFailedReason*.

Declared In: FBError.h
FBErrorLoginFailedReasonInlineCancelledValue
FBSDK_EXTER N NSString *const FBErrorLoginFailedReasonInlineCancelledValue;
Discussion:

A value that may appear in an NSError userInfo dictionary under the FBErrorLoginFailedReason key for login failures. Indicates the user cancelled a web dialog auth.

Declared In: FBError.h
FBErrorLoginFailedReasonInlineNotCancelledValue
FBSDK_EXTER N NSString *const FBErrorLoginFailedReasonInlineNotCancelledValue;
Discussion:

A value that may appear in an NSError userInfo dictionary under the FBErrorLoginFailedReason key for login failures. Indicates the user did not cancel a web dialog auth.

Declared In: FBError.h
FBErrorLoginFailedReasonOtherError
FBSDK_EXTER N NSString *const FBErrorLoginFailedReasonOtherError;
Discussion:

A value that may appear in an NSError userInfo dictionary under the FBErrorLoginFailedReason key for login failures. Indicates an error condition. You may inspect the rest of userInfo for other data.

Declared In: FBError.h
FBErrorLoginFailedReasonSystemAccountNotConfigured
FBSDK_EXTER N NSString *const FBErrorLoginFailedReasonSystemAccountNotConfigured;
Discussion:

A value that may appear in an NSError userInfo dictionary under the FBErrorLoginFailedReason key for login failures. Indicates an attempt to request Facebook account access from iOS when the Facebook account has not been configured.

Declared In: FBError.h
FBErrorLoginFailedReasonSystemDisallowedWithoutErrorValue
FBSDK_EXTER N NSString *const FBErrorLoginFailedReasonSystemDisallowedWithoutErrorValue;
Discussion:

A value that may appear in an NSError userInfo dictionary under the FBErrorLoginFailedReason key for login failures. Indicates the app's slider in iOS 6 (device Settings -> Privacy -> Facebook {app}) has been disabled.

Declared In: FBError.h
FBErrorLoginFailedReasonSystemError
FBSDK_EXTER N NSString *const FBErrorLoginFailedReasonSystemError;
Discussion:

A value that may appear in an NSError userInfo dictionary under the FBErrorLoginFailedReason key for login failures. Indicates an error has occurred when requesting Facebook account acccess in iOS 6 that was not FBErrorLoginFailedReasonSystemDisallowedWithoutErrorValue nor a user cancellation.

Declared In: FBError.h
FBErrorLoginFailedReasonUserCancelledSystemValue
FBSDK_EXTER N NSString *const FBErrorLoginFailedReasonUserCancelledSystemValue;
Discussion:

A value that may appear in an NSError userInfo dictionary under the FBErrorLoginFailedReason key for login failures. Indicates the user cancelled an iOS system login.

Declared In: FBError.h
FBErrorLoginFailedReasonUserCancelledValue
FBSDK_EXTER N NSString *const FBErrorLoginFailedReasonUserCancelledValue;
Discussion:

A value that may appear in an NSError userInfo dictionary under the FBErrorLoginFailedReason key for login failures. Indicates the user cancelled a non-iOS 6 SSO (either Safari or Facebook App) login.

Declared In: FBError.h
FBErrorParsedJSONResponseKey
FBSDK_EXTER N NSString *const FBErrorParsedJSONResponseKey;
Discussion:

The key in the userInfo NSDictionary of NSError for the parsed JSON response from the server. In case of a batch, includes the JSON for a single FBRequest.

Declared In: FBError.h
FBErrorReauthorizeFailedReasonSessionClosed
FBSDK_EXTER N NSString *const FBErrorReauthorizeFailedReasonSessionClosed;
Discussion:

A value that may appear in the NSError userInfo dictionary under the FBErrorLoginFailedReason key when requesting new permissions fails. Indicates the request for new permissions has failed because the session was closed.

Declared In: FBError.h
FBErrorReauthorizeFailedReasonUserCancelled
FBSDK_EXTER N NSString *const FBErrorReauthorizeFailedReasonUserCancelled;
Discussion:

A value that may appear in the NSError userInfo dictionary under the FBErrorLoginFailedReason key when requesting new permissions fails. Indicates the request for new permissions has failed because the user cancelled.

Declared In: FBError.h
FBErrorReauthorizeFailedReasonUserCancelledSystem
FBSDK_EXTER N NSString *const FBErrorReauthorizeFailedReasonUserCancelledSystem;
Discussion:

A value that may appear in the NSError userInfo dictionary under the FBErrorLoginFailedReason key when requesting new permissions fails on iOS 6 with the Facebook account. Indicates the request for new permissions has failed because the user cancelled.

Declared In: FBError.h
FBErrorReauthorizeFailedReasonWrongUser
FBSDK_EXTER N NSString *const FBErrorReauthorizeFailedReasonWrongUser;
Discussion:

A value that may appear in the NSError userInfo dictionary under the FBErrorLoginFailedReason key when requesting new permissions fails. Indicates the request for new permissions has failed because the request was for a different user than the original permission set.

Declared In: FBError.h
FBErrorSessionKey
FBSDK_EXTER N NSString *const FBErrorSessionKey;
Discussion:

The key in the userInfo NSDictionary of NSError where you can find the session associated with the error (if any).

Declared In: FBError.h
FBErrorUnprocessedURLKey
FBSDK_EXTER N NSString *const FBErrorUnprocessedURLKey;
Discussion:

The key in the userInfo NSDictionary of NSError that points to the URL that caused an error, in its processing by FBAppCall.

Declared In: FBError.h
FBInvalidOperationException
FBSDK_EXTER N NSString *const FBInvalidOperationException;
Discussion:

This exception is raised by methods in the Facebook SDK to indicate that an attempted operation is invalid

Declared In: FBError.h
Typedefs
NS_ENUM (NSInteger, FBErrorCategory)

Indicates the Facebook SDK classification for the error

typedef NS_ENUM(NSInteger, FBErrorCategory) {
FBErrorCategoryInvalid = 0,
FBErrorCategoryRetry = 1,
FBErrorCategoryAuthenticationReopenSession = 2,
FBErrorCategoryPermissions = 3,
FBErrorCategoryServer = 4,
FBErrorCategoryThrottling = 5,
FBErrorCategoryUserCancelled = 6,
FBErrorCategoryFacebookOther = -1,
FBErrorCategoryBadRequest = -2,
};
ConstantDescription
FBErrorCategoryInvalid

Indicates that the error category is invalid and likely represents an error that is unrelated to Facebook or the Facebook SDK

FBErrorCategoryRetry

Indicates that the error may be authentication related but the application should retry the operation. This case may involve user action that must be taken, and so the application should also test the fberrorShouldNotifyUser property and if YES display fberrorUserMessage to the user before retrying.

FBErrorCategoryAuthenticationReopenSession

Indicates that the error is authentication related and the application should reopen the session

FBErrorCategoryPermissions

Indicates that the error is permission related

FBErrorCategoryServer

Indicates that the error implies that the server had an unexpected failure or may be temporarily down

FBErrorCategoryThrottling

Indicates that the error results from the server throttling the client

FBErrorCategoryUserCancelled

Indicates the user cancelled the operation

FBErrorCategoryFacebookOther

Indicates that the error is Facebook-related but is uncategorizable, and likely newer than the current version of the SDK

FBErrorCategoryBadRequest

Indicates that the error is an application error resulting in a bad or malformed request to the server.

Declared In: FBError.h
NS_ENUM (NSUInteger, FBErrorCode)

Error codes returned by the Facebook SDK in NSError.

typedef NS_ENUM(NSInteger, FBErrorCode) {
FBErrorInvalid = 0,
FBErrorOperationCancelled,
FBErrorLoginFailedOrCancelled,
FBErrorRequestConnectionApi,
FBErrorProtocolMismatch,
FBErrorHTTPError,
FBErrorNonTextMimeTypeReturned,
FBErrorDialog,
FBErrorAppEvents,
FBErrorSystemAPI,
FBErrorAppActivatedWhilePendingAppCall,
FBErrorUntrustedURL,
FBErrorMalformedURL,
FBErrorSessionReconnectInProgess,
FBErrorOperationDisallowedForRestrictedTreatment,
};
ConstantDescription
FBErrorInvalid

Like nil for FBErrorCode values, represents an error code that has not been initialized yet.

FBErrorOperationCancelled

The operation failed because it was cancelled.

FBErrorLoginFailedOrCancelled

A login attempt failed

FBErrorRequestConnectionApi

The graph API returned an error for this operation.

FBErrorProtocolMismatch

The operation failed because the server returned an unexpected response. You can get this error if you are not using the most recent SDK, or if you set your application's migration settings incorrectly for the version of the SDK you are using.

If this occurs on the current SDK with proper app migration settings, you may need to try changing to one request per batch.

FBErrorHTTPError

Non-success HTTP status code was returned from the operation.

FBErrorNonTextMimeTypeReturned

An endpoint that returns a binary response was used with FBRequestConnection. Endpoints that return image/jpg, etc. should be accessed using NSURLRequest

FBErrorDialog

An error occurred while trying to display a native dialog

FBErrorAppEvents

An error occurred using the FBAppEvents class

FBErrorSystemAPI

An error occurred related to an iOS API call

FBErrorAppActivatedWhilePendingAppCall

The application had its applicationDidBecomeActive: method called while waiting on a response from the native Facebook app for a pending FBAppCall.

FBErrorUntrustedURL

The application had its openURL: method called from a source that was not a Facebook app and with a URL that was intended for the AppBridge

FBErrorMalformedURL

The URL passed to FBAppCall, was not able to be parsed

FBErrorSessionReconnectInProgess

The operation failed because the session is currently busy reconnecting.

FBErrorOperationDisallowedForRestrictedTreatment

Reserved for future use.

Discussion:

These are valid only in the scope of FacebookSDKDomain.

Declared In: FBError.h
NS_ENUM (NSUInteger, FBNativeApplicationErrorCode)

Error codes returned by the Facebook SDK in NSError.

typedef NS_ENUM(NSUInteger, FBNativeApplicationErrorCode) {
FBAppCallErrorUnknown = 1,
FBAppCallErrorUnsupported = 2,
FBAppCallErrorUnknownMethod = 3,
FBAppCallErrorServiceBusy = 4,
FBShareErrorInvalidParam = 100,
FBShareErrorServer = 102,
FBShareErrorUnknown = 103,
FBShareErrorDenied = 104,
};
ConstantDescription
FBAppCallErrorUnknown

A general error in processing an FBAppCall, without a known cause. Unhandled exceptions are a good example

FBAppCallErrorUnsupported

The FBAppCall cannot be processed for some reason

FBAppCallErrorUnknownMethod

The FBAppCall is for a method that does not exist (or is turned off)

FBAppCallErrorServiceBusy

The FBAppCall cannot be processed at the moment, but can be retried at a later time.

FBShareErrorInvalidParam

Share was called in the native Facebook app with incomplete or incorrect arguments

FBShareErrorServer

A server error occurred while calling Share in the native Facebook app.

FBShareErrorUnknown

An unknown error occurred while calling Share in the native Facebook app.

FBShareErrorDenied

Disallowed from calling Share in the native Facebook app.

Discussion:

These are valid only in the scope of FacebookNativeApplicationDomain.

Declared In: FBError.h