Facebook - sending to group page

I am trying to publish to a group page using the FB JS API, basically the user selects the group to which they want to send messages and sends it to the wall.

I do:

FB.ui(
    {
      method: 'stream.publish',
      from: myId,
      to: groupID,
      attachment: {
        name: 'Post to a group Test,
        href: 'http://www.test.com'
      }
     });

But when I try it, he says:

Invalid target specified: <(GroupID)>. The goal should be a page, event, or user that the actor can post to the wall.

You, I know that I can publish on the group page, so I don’t know why it says.

And I'm not talking about fan pages, I can publish to them in order to install from and to the same thing (posting as administrator).

Is it possible? or am I just doing it wrong? ..

Thank,

Andrew

+3
source share
3

, stream.publish feed, () jQuery UI Dialog , FB.api:

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);
    }
});
+5

, API facebook, groupID? "(groupid)"? , - , API , . , ;-) .

0

Source: https://habr.com/ru/post/1787922/


All Articles