This document refers to a feature that was removed after PHP SDK 4.0.0.
PHP SDK Version
5.0.0

FacebookRequestException for the Facebook SDK for PHP

Represents an exception thrown by executing a Facebook request.

Facebook\FacebookRequestException

This base class has several subclasses:

FacebookAuthorizationException
FacebookClientException
FacebookPermissionException
FacebookServerException
FacebookThrottleException
FacebookOtherException

Whenever a FacebookRequestException is thrown, it will be one of these types. They are derived from the error information here: https://developers.facebook.com/docs/graph-api/using-graph-api/#errors

Instance Methods

FacebookRequestException extends from the base \Exception class, so getCode() and getMessage() are available by default.

getHttpStatusCode

getHttpStatusCode()
Returns the HTTP status code returned with this exception.

getSubErrorCode

getSubErrorCode()
Returns the numeric sub-error code returned from Facebook.

getErrorType

getErrorType()
Returns the type of error as a string.

getResponse

getResponse()
Returns the decoded response used to create the exception.

getRawResponse

getRawResponse()
Returns the raw response used to create the exception.