Error Codes
Problem
My API calls don’t work! I’m getting errors back!
Solution
Don’t panic! 100- and 200-class errors are Facebook’s way of telling you that there’s something wrong with your API calls. The possible error codes are listed in Table 9-9.
Table 9-9. API error codes
Error code | Description |
---|---|
| An unknown error occurred. Please resubmit the request. |
| The service is not available at this time. |
| The application has reached the maximum number of requests allowed. More requests are allowed once the time window has completed. |
| The request came from a remote address not allowed by this application. |
| One of the parameters specified was missing or invalid. |
| The API key submitted is not associated with any known application. |
| The session key was improperly submitted or has reached its timeout. Direct the user to log in again to obtain another key. |
| The submitted |
| Incorrect signature. |
| The application does
not have permission to operate on the passed-in |
Discussion
The long, long list of Facebook error codes can be found at http://wiki.developers.facebook.com/index.php/Error_codes.
If you’re getting an error and are having trouble tracking it down in the context of your code, try extracting the call and running it directly inside the API Test Console found at http://developers.facebook.com/tools.php?api.
Get Facebook Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.