Reputation: 321
I want to get data from graph api, in particular I try to get timeline from a group. For example lets take a look at request provided on fb developers overview...
https://graph.facebook.com/195466193802264 this returns a json with group info as expected
https://graph.facebook.com/195466193802264/feed this should return group's timeline, but I get the error below
{ "error": { "message": "An access token is required to request this resource.", "type": "OAuthException", "code": 104 } }
So I created a fb app (I suspected I will need to do this at the begining) and created an access token, but then I could not find any example how to send an access token together with get request, I only found an example how to send access token with a post request using curl. I even tried to fake a browser with python using mechanize and have logged in fb, and confirmed that I agree with apps permisions... again, where to put the token to get data??
I think this api is great, but documentation is just almost great, in the first video the guy tells you that using graph api is the same as making regular http requests, which it should be, but then please provide a working example how to do it...
So can someone please show me how to properly get access token with app key and secret and how to pass this token with the above request for a group's timeline? thank you very much
Upvotes: 3
Views: 2261
Reputation: 15754
For GET requests, you just use a query string parameter:
https://graph.facebook.com/195466193802264/feed?access_token={access token}
As far as the access token, according to the documentation you need:
To read a Group, you need:
Upvotes: 4