简体   繁体   English

在Facebook组javascript SDK上发布

[英]post on facebook group javascript SDK

I'm trying to post on facebook group using my application. 我正在尝试使用我的应用程序在Facebook网上发帖。 If I'm write this: 如果我这样写:

FB.login(function () {
            FB.api('/me/feed', 'post', { message: 'Hello, world!' });
        }, { scope: 'publish_actions' });

I can post on my timeline. 我可以在时间表上发帖。 But when I'm changing me to group_id 但是当我将我更改为group_id时

FB.api('/group-id/feed', 'post', { message: 'Hello, world!' });

I have already take publish_actions and user_groups permitions.. 我已经接受了publish_actionsuser_groups许可。

I can't post on groups. 我无法发布群组。 How can I do that? 我怎样才能做到这一点?

You forgot user_groups in the scope parameter: 您在scope参数中忘记了user_groups:

FB.login(function () {
    FB.api('/[group-id]/feed', 'post', {message: 'Hello, world!'});
}, {scope: 'publish_actions, user_groups'});

See Facebook docs for more information about group posting: https://developers.facebook.com/docs/graph-api/reference/v2.1/group/feed 有关组发布的更多信息,请参阅Facebook文档: https : //developers.facebook.com/docs/graph-api/reference/v2.1/group/feed

A user access token, for someone able to post to the group, with publish_actions and user_groups permission is required. 需要具有publish_actions和user_groups权限的用户访问令牌(对于能够发布到该组的人)。

Keep in mind that you are not allowed to prefill the message parameter (it must be user generated), and you have to go through a review process to make those permissions available for other users: https://developers.facebook.com/docs/apps/review 请记住,不允许您预填充message参数(它必须由用户生成),并且您必须经过审核过程才能使这些权限可用于其他用户: https : //developers.facebook.com/docs / apps / review

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM