我正在尝试使用以下curl命令获取特定Facebook品牌页面的帖子
https://graph.facebook.com/v2.10/me/photos?access_token=xxx
出现以下错误
{
"error": {
"message": "An active access token must be used to query information about the current user.",
"type": "OAuthException",
"code": 2500,
"fbtrace_id": "DH1T17dMqR+"
}
}
我使用以下curl命令来获取 Activity 访问 token https://graph.facebook.com/oauth/access_token?type=client_cred&client_id=XXX&client_secret=YYY
Facebook 应用程序已由页面管理员创建,客户端 ID 和客户端 key 用于获取应用程序访问 token 。
之前我们使用 page-id 而不是“me”标识符来使用上面的curl 来获取帖子,并且它对于特定的 Facebook 帐户运行良好。
其中 page-id 是您想要获取其帖子的特定 Facebook 页面的 ID。
现在,相同的配置不适用于其他页面。
最佳答案
该页面很可能受到年龄或位置的限制,因此您必须对 /page-id/photos
使用用户 token 或页面 token 。
有关代币的更多信息:
关于java - https ://graph. facebook.com/v2.10/me/photos?access_token=xxxxxx 返回错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45300307/