Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook oauth/access_token missing

Dunno if Im missing something but here goes. Im trying to get an access_token for my application so that it can go and look up events for certain public groups on facebook, without requiring a user to be logged in.

Im trying to get an access_token from https://graph.facebook.com/oauth/access_token?client_secret=foobar&client_id=foobar&grant_type=client_credentials&format=json&sdk=ios

This returns a string: access_token=xxxx|ugtqdoWfvvo5_S-Fo2D7_I4rdbc

Thats nice and all, but its no json. Any insights on why the returned string is not json encoded ?

Note: Im using the Facebook ios SDK function like so [_facebook requestWithGraphPath:@"oauth/access_token" andParams:params andHttpMethod:@"POST" andDelegate:self];

like image 815
H. Jensen Avatar asked Oct 05 '10 08:10

H. Jensen


1 Answers

This is a BUG: https://developers.facebook.com/bugs/325262010847554

Facebook's OAuth 2.0 implementation is clearly in violation of the spec: https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-25#section-5.1

I'm using Server-side Web App flow and have the same issue that you describe for the iOS SDK.

like image 88
jkoreska Avatar answered Sep 20 '22 10:09

jkoreska