Question

i have trouble posting to a fb page of an user.

I can easily post to a users wall from my app but not on the user page wall??

What i did to post on to the users wall:

At first i requested all the required permissions from the USER which is manager of its page content:

'scope' => 'photo_upload,user_status,read_stream,publish_stream,user_photos,manage_pages,offline_access'

So now my app has the permission to post to the users wall and all i do to get user profile response is:

$user_profile = $facebook->api('/USERNAME');

And then write to the users wall like this:

$facebook->api("/USERNAME/feed", "post", array('message' => $params['message']));

BUT when i try the same thing with the users page wall it doesn't work!

When i ask the users page for the same permissions it doesn't work an redirects to the user wall and then sets the permissions for the user not for the users page.

So now i'm stuck, i cant get the users page to grant me the permissions or do i even need that if the user is a manager of his page and i got manage_pages permission??

This doesn't work either:

$facebook->api("/PAGEID/feed?access_token=".APP_ACCESS_TOKEN, "post", array('message' => $params['message']));

..it results in: Fatal error: Uncaught OAuthException: (#200) The user hasn't authorized the application to perform this action.

Was it helpful?

Solution

Have you already seen this?

I think you need to pass an access_token with long-lived expiration time of one of the admins if you want to do this offline

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top