8

の扱い方を確認したいaccess_token。したがって、私curlは次のクエリを実行するために使用します。

curl -X POST https://graph.facebook.com/oauth/access_token -d "client_id=<appId>&client_secret=<secret>&grant_type=client_credentials&redirect_uri="

の値を返しますaccess_token

次に、友達のリストを取得したいと思います。

curl -X POST https://graph.facebook.com/me/friends -d "access_token=<token>"

次のエラーが返されます。

{"error":{"message":"An active access token must be used to query information about the current user.","type":"OAuthException","code":2500}}

ヒントはありますか?

4

4 に答える 4

0

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?

于 2012-11-28T21:13:08.587 に答える
0

I think your issue may be the "/me" identifier you're using when you try to access your own data. (Depending on what your client ID is set as you may be referring to the application instead of yourself, try it with your profiles ID instead of "/me").

Also check this out https://stackoverflow.com/a/6701982/1546542

于 2012-11-28T21:07:18.130 に答える