Reputation: 1406
I have a problem reading the response from facebook when authenticating on the url with curl
The response that comes back in the body is: access_token=XXX&expires=5435
My question is: How do I make Facebook reply with Json data?
I have tried adding Content-Type:json
to the request headers but it does not help.
Thanks for any help!
Br
Niclas
Upvotes: 1
Views: 342
Reputation: 7200
It's a bug: http://developers.facebook.com/bugs/325262010847554?browse=search_4f99eacc521fc2634034618
It violates the OAuth 2.0 spec (which FB is co-authoring!): https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-25#section-5.1
I agree - they should at least honor the Accept: application/json
header!
See also a similar question, here: Facebook oauth/access_token missing
Upvotes: 1
Reputation: 2333
That's an exception on the Graph API. /oauth/access_token is the only point that doesn't return JSON, as far as I know.
Upvotes: 2