Facebook Developers
DocsToolsSupportNewsApps
Log In
  • Social Plugins
  • Facebook Login
  • Open Graph
  • Facebook APIs
  • Games
  • Media
  • Payments
  • App Center
  • Promote Your App
  • iOS
  • Android
  • Web
    • Getting Started
    • JavaScript SDK
    • PHP SDK
    • More SDKs
    • Facebook for WordPress
  • Technology Partners
  • Facebook Object
    • api
    • getAccessToken
    • getApiSecret
    • getAppId
    • getLoginStatusUrl
    • getLoginUrl
    • getLogoutUrl
    • getSignedRequest
    • getUser
    • setAccessToken
    • setApiSecret
    • setAppId
    • setFileUploadSupport
    • useFileUploadSupport
  • FacebookApiException
    • getResult
    • getType

getResult

Web › PHP SDK › getResult

FacebookApiException::getResult()

Get the object that is the result of the error or exception returned by the server. This is an array containing the error message from the server.

Example

try {
  $facebook->api('/me/feed','POST',
                   array( 
                     'message' => 'Hello World!',
                     'link' => 'www.example.com'
                        )
                );
} catch(FacebookApiException $e) {
  $result = $e->getResult();
  error_log(json_encode($result));
}

Parameters

None.

Updated over a year ago
Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy