fbgraph error code - facebook

Does anyone know where can I find all the error code and error type for FBGraph? While handling error, I want to check what error FBGraph throws (like: duplicate post error, access token expire error) and take action accordingly. (I a working on Ruby On Rails 3)
I referred the documentation, but it doesn't list out the code and type of all the errors. Where can I find these error codes?
Thanks... :)

This has long been a problem with using the Graph API. There's no documentation anywhere as to all the possible errors that you can receive. Additionally there are errors that you receive randomly that don't occur when you make the same request again (ie bugs).
A lot of the Graph API seems to have an underlying structure that makes FQL queries. So, when those FQL based queries throw an error you can find the code here: http://fbdevwiki.com/wiki/Error_codes#FQL_Errors

Related

Retrieving place will raise error in Facebook event download

There is only one field of difference between the two Facebook Graph Query. One will succeed, oter will fail. Why place makes it different? Anyway the error message has no meaning at all.
Using following query: 1105135492844152/events

Errors from Facebook graph API on posting - Service temporarily unavailable

Recently I get temporary errors from Facebook API after user is trying to share a post through "me/feed" route.
The error message is :
"message":"Service temporarily unavailable",
"type":"FacebookApiException",
"is_transient":true, "code":2,
"error_subcode":1609010,
"error_user_title":"URL Not Found",
"error_user_msg":"We had trouble using the URL you provided. Please try again later.",
"fbtrace_id":"DgSULoXJMfK"
Anyone know what could be the reason for this?
I'm pretty confident this is a bug. We're finding that the exact same post will fail when published to some pages, but succeed on others. This sort of inconsistency along with the feedback of others (see below) suggests that this behavior is due to a bug.
https://developers.facebook.com/bugs/1571642049794292/
I've the same error when try to use Facebook OAuth2 with scope=email name
Fixed by setting scope=email

An unknown error has occurred on Graph Facebook

I tried to get Data from Facebook Page with the graph of Facebook but I have a problem.
When I try to go on link like:
https://graph.facebook.com/ID-PAGE?access_token=MY_ACCESS_TOKEN
I always do this to have the Data from a Page but since today I have the error Message: "An unknown error has occurred".
Thanks for help.
EDIT:
The bug is fixed : https://developers.facebook.com/bugs/486654544831076/?search_id
Have a look at my answer at
How to get user email and birthday from Facebook API Version v2.4
You have to specify each field you want to query now with v2.4. If you want to explicitly use v2.3, you need to prepend your calls by /v2.3 like this:
/v2.3/{page_id}?access_token=MY_ACCESS_TOKEN
Seems like there's currently a bug regarding requests made with app access tokens instead of user access tokens:
https://developers.facebook.com/bugs/486654544831076/
At this moment, I pretty much figured out what is happening, and it looks like a bug in the Facebook API.
For v2.3 and lower:
The /PAGE-ID call will return an Unknown server error when you don't pass ?fields=username (for example). If you do pass the fields option, it will work. You can get it out of the docs.
For v2.4:
This will work, but you will miss a lot of data, so you'll also have to pass the fields options. But if you don't pass that, this version will give you back only the most basic of details. This is as described in the version release: https://developers.facebook.com/blog/post/2015/07/08/graph-api-v2.4/
So the solution for now, would be to add the ?fields= everywhere you need, or to wait for Facebook to maybe ever solve it.
(And while you're at it, you might as well upgrade to v2.4 ;-)

Facebook's FacebookApiException class's error codes?

Where can I find a list of all the error codes for Facebook's FacebookApiException class? I found 2 such lists, both of which are outdated: https://developers.facebook.com/docs/reference/api/errors/ and http://www.fb-developers.info/tech/fb_dev/faq/general/gen_10.html
From debugging my own script, I found out that error #2500 is "An active access token must be used to query information about the current user." and error #3501 is "User is already associated to the article object on a unique action type Read." Neither error codes are in the links posted above.
This might help you. Most probably Login related error.
https://code.google.com/p/facebook-actionscript-api/issues/detail?id=453

List of Facebook error codes

I'm looking for a list of all Facebook can return when you try to fetch infos using Graph API. Can anyone help?
Facebook returns a 400 HTTP error, and a JSON content like:
{
"error": {
"type": "OAuthException",
"message": "Invalid OAuth access token signature."
}
}
I'm searching the different returns of the same kind it is possible to get.
Facebook used to have this published somewhere, but for whatever reason it was removed. But you can find the full list here:
http://www.takwing.idv.hk/tech/fb_dev/faq/general/gen_10.html
There seems to be a list now for the errors.
I posted answer for the same question here: Facebook Graph API error code list
(I found the list here https://developers.facebook.com/docs/graph-api/using-graph-api/error-handling)
In case Takwing's copy ever comes down, here's another copy: http://fbdevwiki.com/wiki/Error_codes
These codes were primarily for the REST API, but they do also come up with the Graph API. Some of the Graph API calls have underlying FQL calls that return the FQL error codes. And the direct FQL queries are still part of the currently accepted API.
Update: I'm trying to keep this list up-to-date. Please feel free to make changes as you encounter new errors.
I am trying to keep an updated list of error codes based on previous outdated information.
You can find the repo here http://github.com/phwd/fbec and it has been updated with Test User and Credit Error codes from the Facebook Documentation.
Currently looking for the constant name for "Error Code 2500" and some error descriptions may have changed. I hope to keep on top of this.
There is an official error code page, now:
https://developers.facebook.com/docs/marketing-api/error-reference/
It still doesn't look comprehensive...