[facebook] Facebook Graph API error code list

Where can I find the official Graph API Error Code list?

I have been using the Graph API for half a year, and in the past 6 months, the error code's format has changed twice!

The first time I saw the error code, it looks like:

{   
    "error": {
        "message": "Error invalidating access token: The session has been invalidated because the user has changed the password.",      
        "type": "OAuthException",      
    }
}

It's really stranger, the error message didn't provide any error code!

And then several months later, the "expected" error code was introduced.

{   
    "error": {
        "message": "Error invalidating access token: The session has been invalidated because the user has changed the password.",      
        "type": "OAuthException",      
        "code": 190,      
    }
}

But sadly, you still cannot distinguish what the error exactly is by checking the "code", since many errors with the same "type" have the same "code".

Just now, I found the error message contains new field:

{   
    "error": {
        "message": "Error invalidating access token: The session has been invalidated because the user has changed the password.",      
        "type": "OAuthException",      
        "code": 190,      
        "error_subcode": 460   
    }
}

OK, it's just what I need.

But where can I find the error code list? I knew there is FQL error code list, http://fbdevwiki.com/wiki/Error_codes#FQL_Errors, but it seems out of date and does not provide any message about the "error_subcode".

This question is related to facebook facebook-graph-api

The answer is


I have also found some more error subcodes, in case of OAuth exception. Copied from the facebook bugtracker, without any garantee (maybe contain deprecated, wrong and discontinued ones):

/**
  * (Date: 30.01.2013)
  *
  * case 1: - "An error occured while creating the share (publishing to wall)"
  *         - "An unknown error has occurred."
  * case 2:    "An unexpected error has occurred. Please retry your request later."
  * case 3:    App must be on whitelist        
  * case 4:    Application request limit reached
  * case 5:    Unauthorized source IP address        
  * case 200:  Requires extended permissions
  * case 240:  Requires a valid user is specified (either via the session or via the API parameter for specifying the user."
  * case 1500: The url you supplied is invalid
  * case 200:
  * case 210:  - Subject must be a page
  *            - User not visible
  */

 /**
  * Error Code 100 several issus:
  * - "Specifying multiple ids with a post method is not supported" (http status 400)
  * - "Error finding the requested story" but it is available via GET
  * - "Invalid post_id"
  * - "Code was invalid or expired. Session is invalid."
  * 
  * Error Code 2: 
  * - Service temporarily unavailable
  */

While there does not appear to be a public, Facebook-curated list of error codes available, a number of folks have taken it upon themselves to publish lists of known codes.

Take a look at StackOverflow #4348018 - List of Facebook error codes for a number of useful resources.


I was looking for the same thing and I just found this list

https://developers.facebook.com/docs/reference/api/errors/


Examples related to facebook

I am receiving warning in Facebook Application using PHP SDK React-Native: Application has not been registered error Can't Load URL: The domain of this URL isn't included in the app's domains Facebook OAuth "The domain of this URL isn't included in the app's domain" Facebook login message: "URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings." Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView` Open Facebook Page in Facebook App (if installed) on Android App not setup: This app is still in development mode IOS - How to segue programmatically using swift Get ALL User Friends Using Facebook Graph API - Android

Examples related to facebook-graph-api

"Uncaught (in promise) undefined" error when using with=location in Facebook Graph API query Facebook OAuth "The domain of this URL isn't included in the app's domain" Facebook login message: "URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings." Facebook Graph API v2.0+ - /me/friends returns empty, or only friends who also use my application Creating a Facebook share button with customized url, title and image Facebook API "This app is in development mode" The developers of this app have not set up this app properly for Facebook Login? New og:image size for Facebook share? facebook: permanent Page Access Token? How to programmatically log out from Facebook SDK 3.0 without using Facebook login/logout button?