querying the graph api with curl

curl, facebook-graph-api

Solution

Have you tried using the debugger? Debug your access token here, it'll tell you abou that access token, and if its tied to a user: https://developers.facebook.com/tools/debug

Also, why are you using POST to get /me/friends?

Problem

I want to check how to handle the `access_token`. So, I use `curl` to perform the following queries: ``` curl -X POST https://graph.facebook.com/oauth/access_token -d "client_id=<appId>&client_secret=<secret>&grant_type=client_credentials&redirect_uri=" ``` It returns a value for `access_token`. Then, I'd like to get the list of my friends: ``` curl -X POST https://graph.facebook.com/me/friends -d "access_token=<token>" ``` It returns this error: ``` {"error":{"message":"An active access token must be used to query information about the current user.","type":"OAuthException","code":2500}} ``` Any hints ?

Original source