【发布时间】:2011-09-10 02:58:47
【问题描述】:
我是 Facebook PHP SDK for Graph API 的新手。
我在 Facebook 上创建了一个应用程序,并获得了应用程序 ID、秘密 ..etc。
我还使用范围参数获得了具有某些权限的访问代码。
使用该代码,我获得了离线访问的访问令牌。
https://graph.facebook.com/oauth/access_token?client_id=xxxxxxxxxx&redirect_uri=http://192.168.15.5/xxxx/facebook/&client_secret=xxxxx&grant_type=client_credentials。
使用这个我得到了访问令牌。 现在我的问题是我想访问照片和好友列表等用户信息
不知道对不对,
https://graph.facebook.com/me/friends?access_token=xxxxxxxxxxxxxxxxxxxxx
当我使用它时,它会说,
"{
"error": {
"type": "OAuthException",
"message": "An active access token must be used to query information about the current user."
}
}"
如何使用该用户的访问令牌访问用户信息。 对于允许我的应用程序访问其信息的用户,我想随时从应用程序访问用户信息。
【问题讨论】:
标签: facebook-graph-api facebook-php-sdk