Facebook错误。如果要发布到网上论坛,则需要在该网上论坛中安装应用

时间:2019-05-28 20:04:51

标签: node.js facebook facebook-graph-api

我正在自动将帖子发布到Facebook页面(服务器到服务器)。我在这里使用文档:https://developers.facebook.com/docs/pages/publishing/

我正在使用的功能是:

var request = require('request')
var FBG = {FACEBOOK_PAGE}
var fbObj = {
    message: 'hello world',
    access_token: {ACCESS_TOKEN}
};
request.post('https://graph.facebook.com/' +  FBG '/feed', fbObj, (err, data) => {
  data = JSON.parse(data);
  console.log(data);
})

输出:

{"error":
    {
      "message":"(#200) If posting to a group, requires app being installed in the group, and \\\\\\n          either publish_to_groups permission with user token, or both manage_pages \\\\\\n          and publish_pages permission with page token; If posting to a page, \\\\\\n          requires both manage_pages and publish_pages as an admin with \\\\\\n          sufficient administrative permission",
    "type":"OAuthException",
    "code":200,
    "fbtrace_id":"asdasd31e"
    }
 }

接受manage_pages和publish_pages的凭据。而当我通过Graph Api实现它时。

0 个答案:

没有答案
相关问题