Facebook has some great-looking examples of Open Graph requests here:
https://developers.facebook.com/docs/reference/api/examples/
The problem is that since I don't have an access token, most of the examples just return
{ "error": { "message": "An active access token must be used to query information about the current user.", "type": "OAuthException", "code": 2500 } }
I understand access tokens, but how do I get the token so that I can experiment with these example requests?
Using a valid, long-lived access token, your server sends a request to get a code from Facebook. Facebook sends a code back to your server and you securely send this code to the client. The client uses this code to request a long-lived token from Facebook.
Use the Graph API Explorer to generate a token with the permissions you want.
Don't hesitate to select all of them.
Then, just copy/paste the token at the end of each graph.facebook.com
URL. For instance:
https://graph.facebook.com/v1.0/me/friends?access_token=<ACCESS_TOKEN>
Start by reading this doc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With