Reputation: 5579
The official Facebook Docs says following for API v2.2:
All API endpoints will now always return valid JSON
But when I call this endpoint:
It returns a flat string instead of a JSON if successful:
HTTP/1.1 200 OK
...
access_token=XXX&expires=5182351
But the same endpoint returns JSON if failed:
HTTP/1.1 400 Bad Request
...
{"error":{"message":"This authorization code has expired.","type":"OAuthException","code":100}}
Is it a bug in API or a mistake in the Docs?
Upvotes: 0
Views: 217
Reputation: 19995
Sounds more like an oversight in semantics than anything.
The oauth/access_token
is an entry point for the API, whereas the majority of other points that have graph.facebook.com as the base, consume the access token obtained from there.
i.e. graph.facebook.com/{object}?access_token=ACCESS_TOKEN
Filing a documenation bug would be the best way to find out for sure.
Upvotes: 1