Facebook - Posting to a Group page

为君一笑 提交于 2019-12-04 14:07:31
ifaour

It seems that both stream.publish and feed methods are not supported for groups object so your best solution is to use (for example) the jQuery UI Dialog component with the fields you need to post to the group as inputs and on the submission use the FB.api method:

FB.api("/group_id/feed", 'post', { name: nameVar, link: linkVar }, function(response) {
    if (!response || response.error) {
        alert('Error occured');
    } else {
        alert('Post ID: ' + response.id);
    }
});

I'm not experienced, with the facebook API, but what is the value of the groupID variable? is it "(groupid)"? If not, then it is a really unclear error message - and I wonder how the API knows that you tried to post on a group. If so, then there you have it ;-) You should fill in a group id.

According to the documentations, Facebook groups are not mentioned in the list of possible targets to publish to. I filed a bug to hopefully get Facebook to address this:

http://developers.facebook.com/bugs/158247050931954

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!