简体   繁体   中英

How to get statuses of a random facebook page through Graph API

I'm trying to get the statuses of a facebook page. For this I need an access token, which I can obtain by this:

https://graph.facebook.com/oauth/access_token?
client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&
grant_type=client_credentials  

( Found here )

But when I try to access the graph api manually, with the access token, like this: https://graph.facebook.com/id_of_page/statuses?access_token=my_fresh_access_token , I always get this error:

{
  "error": {
  "message": "A user access token is required to request this resource.",
  "type": "OAuthException",
  "code": 102
}
}

Are there different 'kinds' of access tokens? Or what am I doing wrong?

There are several access tokens on Facebook. The access token you are receiving is an app access token which is more limited than the user access token.

The access tokens available are explained here under 'Access Token terminology': https://developers.facebook.com/docs/authentication/permissions/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM