44

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.

Stephen Ostermiller
  • 23,933
  • 14
  • 88
  • 109
Alexis Dufrenoy
  • 11,784
  • 12
  • 82
  • 124
  • 1
    I saw this question mentioned https://meta.stackoverflow.com/a/373459 I just edited to remove the tag. Tag edits are still possible using the "Edit tags" link beside the tags, even if the question title would have to be lengthened to make other edits. – Stephen Ostermiller Mar 03 '22 at 13:43

5 Answers5

26

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

Amith
  • 391
  • 1
  • 4
  • 8
19

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)

Duncan Jones
  • 67,400
  • 29
  • 193
  • 254
Daniel Backman
  • 5,121
  • 1
  • 32
  • 37
8

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.

Tim Tisdall
  • 9,914
  • 3
  • 52
  • 82
  • Nice work Tim ☺. Anyway, I still have some problem trying to understand the difference between error code "10" and error code "200"... facebook still doesn't help me in understanding the difference – thermz Nov 09 '12 at 10:28
  • I'm not sure, but the 200 code (I think) is specific to the user while 10 seems to be specific to whether an application has access to something. So, perhaps 10 is seen when you use an application token instead of a user token. – Tim Tisdall Jan 03 '13 at 15:39
6

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.

phwd
  • 19,975
  • 5
  • 50
  • 78
0

There is an official error code page, now:

https://developers.facebook.com/docs/marketing-api/error-reference/

It still doesn't look comprehensive...

Alexis Dufrenoy
  • 11,784
  • 12
  • 82
  • 124