Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Graph permissions incorrect

I'm trying to update my code to work with the FB Graph 3.0.

The login flow works fine, and I request my permissions and the user grants them. The later bit of PHP code that uses the PHP SDK is meant to post to the user's timeline.

$r = $this->facebook->get('/me/permissions');
$result = $this->facebook->post('/me/feed/', $fbpost);

If I examine $r, I can see that I have the permissions required:

manage_pages: granted
publish_pages: granted
public profile: granted
pages_show_list: granted

Yet when it makes the actual request, it fails with an error: (#200) Requires either publish_actions permission, or manage_pages and publish_pages as an admin with sufficient administrative permission

When I attempt to add the publish_actions grant to my login (using the javascript library) I get an error that it's invalid: Invalid Scopes: publish_actions. despite FB's own documentation showing this exact scope in several example.

Can anyone point out what I'm doing wrong?

EDIT: I'm not all that concerned with the publish_actions scope having changed, though I understand that may be a new change that isn't in the docs-- but I do have the manage_pages and publish_pages permissions, yet I still can't post to my timeline, and the error code seems to say that those permissions are not set.

like image 931
user101289 Avatar asked May 19 '18 23:05

user101289


1 Answers

As explained in the FB v3.0 API /me/feed endpoint documentation you need the user_posts permission (which isn't listed in your granted permissions) to read and publish on this endpoint. Publish_x permissions are only related to pages and group, not personnal feed.

Also check the board of your FB App if there are no review alerts, with the recent changes in legislation (GDPR ...) and Facebook issues (Cambridge Analytica etc...) a lot of changes has been made in the API.

like image 97
WizardNx Avatar answered Sep 28 '22 20:09

WizardNx