Android SDK Version
- AccessToken
- AccessToken.AccessTokenCreationCallback
- AccessToken.AccessTokenRefreshCallback
- AccessTokenManager
- AccessTokenSource
- AccessTokenTracker
- AddressFilterManager
- All
- AppEvent
- AppEventsConstants
- AppEventsLogger
- AppEventsLogger.FlushBehavior
- AppEventsLogger.ProductAvailability
- AppEventsLogger.ProductCondition
- AppEventsManager
- AppGroupCreationContent
- AppGroupCreationContent.AppGroupPrivacy
- AppGroupCreationContent.Builder
- AppInviteContent
- AppInviteContent.Builder
- AppInviteContent.Builder.Destination
- AppInviteDialog
- AppInviteDialog.Result
- AppLinkData
- AppLinkData.CompletionHandler
- AppLinks
- CallbackManager
- CallbackManager.Factory
- CameraEffectArguments
- CameraEffectArguments.Builder
- CameraEffectTextures
- CameraEffectTextures.Builder
- CodelessLoggingEventListener
- CodelessLoggingEventListener.AutoLoggingOnClickListener
- CodelessLoggingEventListener.AutoLoggingOnItemClickListener
- CodelessManager
- Common
- Core
- CreateAppGroupDialog
- CreateAppGroupDialog.Result
- CurrentAccessTokenExpirationBroadcastReceiver
- CurrentPlaceFeedbackRequestParams
- CurrentPlaceFeedbackRequestParams.Builder
- CurrentPlaceRequestParams
- CurrentPlaceRequestParams.Builder
- CurrentPlaceRequestParams.ConfidenceLevel
- CurrentPlaceRequestParams.ScanMode
- CustomTabActivity
- CustomTabLoginMethodHandler
- CustomTabMainActivity
- DefaultAudience
- DeviceAuthDialog
- DeviceLoginButton
- DeviceLoginManager
- DeviceShareButton
- DeviceShareDialog
- DeviceShareDialog.Result
- EventDeactivationManager
- FacebookActivity
- FacebookAppLinkResolver
- FacebookAuthorizationException
- FacebookBroadcastReceiver
- FacebookButtonBase
- FacebookCallback
- FacebookContentProvider
- FacebookDialog
- FacebookDialogException
- FacebookException
- FacebookGraphResponseException
- FacebookOperationCanceledException
- FacebookRequestError
- FacebookRequestError.Category
- FacebookSdk
- FacebookSdk.InitializeCallback
- FacebookSdkNotInitializedException
- FacebookServiceException
- FlushResult
- GameRequestContent
- GameRequestContent.ActionType
- GameRequestContent.Builder
- GameRequestContent.Filters
- GameRequestDialog
- GameRequestDialog.Result
- GraphRequest
- GraphRequest.Callback
- GraphRequest.GraphJSONArrayCallback
- GraphRequest.GraphJSONObjectCallback
- GraphRequest.OnProgressCallback
- GraphRequest.ParcelableResourceWithMimeType
- GraphRequestAsyncTask
- GraphRequestBatch
- GraphRequestBatch.Callback
- GraphRequestBatch.OnProgressCallback
- GraphResponse
- GraphResponse.PagingDirection
- HttpMethod
- InternalAppEventsLogger
- JoinAppGroupDialog
- JoinAppGroupDialog.Result
- LikeView
- LikeView.AuxiliaryViewPosition
- LikeView.HorizontalAlignment
- LikeView.ObjectType
- LikeView.OnErrorListener
- LikeView.Style
- LoggingBehavior
- Login
- LoginBehavior
- LoginButton
- LoginButton.ToolTipMode
- LoginFragment
- LoginManager
- LoginResult
- LoginStatusCallback
- MessageDialog
- Messenger
- MessengerThreadParams
- MessengerThreadParams.Origin
- MessengerUtils
- MetadataIndexer
- Model
- ModelManager
- PlaceFields
- PlaceInfoRequestParams
- PlaceInfoRequestParams.Builder
- PlaceManager
- PlaceManager.LocationError
- PlaceManager.OnRequestReadyCallback
- Places
- PlaceSearchRequestParams
- PlaceSearchRequestParams.Builder
- Profile
- ProfileManager
- ProfilePictureView
- ProfilePictureView.OnErrorListener
- ProfileTracker
- RCTCodelessLoggingEventListener
- RCTCodelessLoggingEventListener.AutoLoggingOnTouchListener
- RestrictiveDataManager
- SendButton
- Share
- ShareApi
- ShareBuilder
- ShareButton
- ShareButtonBase
- ShareCameraEffectContent
- ShareCameraEffectContent.Builder
- ShareContent
- ShareContent.Builder
- ShareDialog
- ShareDialog.Mode
- ShareGraphRequest
- ShareHashtag
- ShareHashtag.Builder
- ShareLinkContent
- ShareLinkContent.Builder
- ShareMedia
- ShareMedia.Builder
- ShareMedia.Type
- ShareMediaContent
- ShareMediaContent.Builder
- ShareMessengerActionButton
- ShareMessengerActionButton.Builder
- ShareMessengerGenericTemplateContent
- ShareMessengerGenericTemplateContent.Builder
- ShareMessengerGenericTemplateContent.ImageAspectRatio
- ShareMessengerGenericTemplateElement
- ShareMessengerGenericTemplateElement.Builder
- ShareMessengerMediaTemplateContent
- ShareMessengerMediaTemplateContent.Builder
- ShareMessengerMediaTemplateContent.MediaType
- ShareMessengerOpenGraphMusicTemplateContent
- ShareMessengerOpenGraphMusicTemplateContent.Builder
- ShareMessengerURLActionButton
- ShareMessengerURLActionButton.Builder
- ShareMessengerURLActionButton.WebviewHeightRatio
- ShareModel
- ShareModelBuilder
- ShareOpenGraphAction
- ShareOpenGraphAction.Builder
- ShareOpenGraphContent
- ShareOpenGraphContent.Builder
- ShareOpenGraphObject
- ShareOpenGraphObject.Builder
- ShareOpenGraphValueContainer
- ShareOpenGraphValueContainer.Builder
- SharePhoto
- SharePhoto.Builder
- SharePhotoContent
- SharePhotoContent.Builder
- Sharer
- Sharer.Result
- ShareStoryContent
- ShareStoryContent.Builder
- ShareToMessengerParams
- ShareToMessengerParamsBuilder
- ShareVideo
- ShareVideo.Builder
- ShareVideoContent
- ShareVideoContent.Builder
- SuggestedEventsManager
- ToolTipPopup
- ToolTipPopup.Style
- UserDataStore
- Utils
- ViewIndexer
- ViewOnClickListener
- WebDialog
- java.lang.Object
- com.facebook.FacebookRequestError
public final class FacebookRequestError
extends java.lang.Object
This class represents an error that occurred during a Facebook request. In general, one would call
getCategory()
to determine the type of error that occurred, and act accordingly. For more information on error handling, see https://developers.facebook.com/docs/reference/api/errors/Nested Class Summary
Modifier and Type | Class and Description |
---|---|
static class | FacebookRequestError.Category An enum that represents the Facebook SDK classification for the error that occurred. |
Field Summary
Modifier and Type | Field and Description |
---|---|
static <any> | CREATOR |
static int | INVALID_ERROR_CODE Represents an invalid or unknown error code from the server. |
static int | INVALID_HTTP_STATUS_CODE Indicates that there was no valid HTTP status code returned, indicating that either the error occurred locally, before the request was sent, or that something went wrong with the HTTP connection. |
Constructor Summary
Constructor and Description |
---|
FacebookRequestError(int errorCode, java.lang.String errorType, java.lang.String errorMessage) |
Method Summary
Modifier and Type | Method and Description |
---|---|
int | describeContents() |
java.lang.Object | getBatchRequestResult() Returns the full JSON response for the batch request. |
FacebookRequestError.Category | getCategory() Returns the category in which the error belongs. |
java.net.HttpURLConnection | getConnection() Returns the HTTP connection that was used to make the request. |
int | getErrorCode() Returns the error code returned from Facebook. |
java.lang.String | getErrorMessage() Returns the error message returned from Facebook. |
java.lang.String | getErrorRecoveryMessage() Returns the message that can be displayed to the user before attempting error recovery. |
java.lang.String | getErrorType() Returns the type of error as a raw string. |
java.lang.String | getErrorUserMessage() Returns a message suitable for display to the user, describing a user action necessary to enable Facebook functionality. |
java.lang.String | getErrorUserTitle() Returns a short summary of the error suitable for display to the user. |
FacebookException | getException() Returns the exception associated with this request, if any. |
JSONObject | getRequestResult() Returns the full JSON response for the corresponding request. |
JSONObject | getRequestResultBody() Returns the body portion of the response corresponding to the request from Facebook. |
int | getRequestStatusCode() Returns the HTTP status code for this particular request. |
int | getSubErrorCode() Returns the sub-error code returned from Facebook. |
java.lang.String | toString() |
void | writeToParcel(Parcel out, int flags) |
Field Detail
INVALID_ERROR_CODE
public static final int INVALID_ERROR_CODE
Represents an invalid or unknown error code from the server.
See Also:
INVALID_HTTP_STATUS_CODE
public static final int INVALID_HTTP_STATUS_CODE
Indicates that there was no valid HTTP status code returned, indicating that either the error occurred locally, before the request was sent, or that something went wrong with the HTTP connection. Check the exception from
getException()
;See Also:
CREATOR
public static final <any> CREATOR
Constructor Detail
FacebookRequestError
public FacebookRequestError(int errorCode, java.lang.String errorType, java.lang.String errorMessage)
Method Detail
getCategory
public FacebookRequestError.Category getCategory()
Returns the category in which the error belongs. Applications can use the category to determine how best to handle the errors (e.g. exponential backoff for retries if being throttled).
Returns:
the category in which the error belong
getRequestStatusCode
public int getRequestStatusCode()
Returns the HTTP status code for this particular request.
Returns:
the HTTP status code for the request
getErrorCode
public int getErrorCode()
Returns the error code returned from Facebook.
Returns:
the error code returned from Facebook
getSubErrorCode
public int getSubErrorCode()
Returns the sub-error code returned from Facebook.
Returns:
the sub-error code returned from Facebook
getErrorType
public java.lang.String getErrorType()
Returns the type of error as a raw string. This is generally less useful than using the
getCategory()
method, but can provide further details on the error.Returns:
the type of error as a raw string
getErrorMessage
public java.lang.String getErrorMessage()
Returns the error message returned from Facebook.
Returns:
the error message returned from Facebook
getErrorRecoveryMessage
public java.lang.String getErrorRecoveryMessage()
Returns the message that can be displayed to the user before attempting error recovery.
Returns:
the message that can be displayed to the user before attempting error recovery
getErrorUserMessage
public java.lang.String getErrorUserMessage()
Returns a message suitable for display to the user, describing a user action necessary to enable Facebook functionality. Not all Facebook errors yield a message suitable for user display; however in all cases where shouldNotifyUser() returns true, this method returns a non-null message suitable for display.
Returns:
the error message returned from Facebook
getErrorUserTitle
public java.lang.String getErrorUserTitle()
Returns a short summary of the error suitable for display to the user. Not all Facebook errors yield a title/message suitable for user display; however in all cases where getErrorUserTitle() returns valid String - user should be notified.
Returns:
the error message returned from Facebook
getRequestResultBody
public JSONObject getRequestResultBody()
Returns the body portion of the response corresponding to the request from Facebook.
Returns:
the body of the response for the request
getRequestResult
public JSONObject getRequestResult()
Returns the full JSON response for the corresponding request. In a non-batch request, this would be the raw response in the form of a JSON object. In a batch request, this result will contain the body of the response as well as the HTTP headers that pertain to the specific request (in the form of a "headers" JSONArray).
Returns:
the full JSON response for the request
getBatchRequestResult
public java.lang.Object getBatchRequestResult()
Returns the full JSON response for the batch request. If the request was not a batch request, then the result from this method is the same as
getRequestResult()
. In case of a batch request, the result will be a JSONArray where the elements correspond to the requests in the batch. Callers should check the return type against either JSONObject or JSONArray and cast accordingly.Returns:
the full JSON response for the batch
getConnection
public java.net.HttpURLConnection getConnection()
Returns the HTTP connection that was used to make the request.
Returns:
the HTTP connection used to make the request
getException
public FacebookException getException()
Returns the exception associated with this request, if any.
Returns:
the exception associated with this request
toString
public java.lang.String toString()
Overrides:
toString
in class java.lang.Object
writeToParcel
public void writeToParcel(Parcel out, int flags)
describeContents
public int describeContents()