Reputation: 121
I am trying to post to my group by a business app type facebook but getting below error:
Fatal error: Uncaught Facebook\Exceptions\FacebookAuthorizationException: (#200)
If posting to a group, requires app being installed in the group, and \
either publish_to_groups permission with user token, or both pages_read_engagement \
and pages_manage_posts permission with page token; If posting to a page, \
requires both pages_read_engagement and pages_manage_posts as an admin with \
sufficient administrative permission
I already ask permission when login( i am using facebook-php-sdk and facebook graph api v2.10):
$permissions = ['email','publish_to_groups' ];
$loginUrl = $helper->getLoginUrl('mydomain/fb-callback.php', $permissions);
I go to https://developers.facebook.com/tools/debug/accesstoken and see result of my access_token: Access token info
So i think problem is my app is not installed in the group. I haved found a similar thread Facebook API - How to add application to group in developer mode, but in this answer, it's just say that if i am an admin of both app and group then it will work, but it still return above error. Now i even can't find this app in personal( Settings > Apps) and my group ( My groups > Settings > Apps). Can anyone help me solve this problem, a clue or a tutorial create facebook app post to group please ? Thank you !
Bounty
To whoever can explain how to post to a Group (not a page) with step by step instructions and screenshots on how to set it up, first in the Graph Explorer followed by programmatically - in either javascript, node, python, c#, powershell or ideally an AWS Lambda:
Upvotes: 10
Views: 6531