我正在自动将帖子发布到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实现它时。