我有一个问题,我正试图在一个页面上发布从中获取的令牌
https://graph.facebook.com/oauth/access_token? client_id = YOUR_APP_ID&client_secret = YOUR_APP_SECRET&grant_type = client_credentials
我想该应用程序有权在该页面上发布,但当我尝试发布时,我收到以下错误
{
"error": {
"message": "(#200) The user hasn't authorized the application to perform this action",
"type": "OAuthException"
}
}
我如何验证权限?
基本上,我希望能够在不要求用户登录的情况下将页面作为页面发布,如果有人可以帮助我,那就太棒了!
1 回答
您正在获取的令牌是 App Access Token .
要在页面上作为页面本身发布,您需要 page access token .
要获取页面访问令牌,您需要使用具有
manage_pages
权限的访问令牌进行以下API调用:这将为您提供页面的页面访问令牌 . 使用它并发布帖子 .
您还可以拥有永不过期的页面访问令牌 . 要得到一个跟随此:What are the Steps to getting a Long Lasting Token For Posting To a Facebook Fan Page from a Server