I am working on a project to post data to the walls of Facebook pages. I have set up a Facebook app and currently requesting the following permissions from user when attempting to post to their page's wall:
publish_stream
offline_access
manage_pages
The code currently posts to a PROFILE's wall successfully, but when trying to post to a PAGE's wall, the following error is returned:
Facebook error: (#200) The user hasn't authorized the application to perform this action.
Again, I am requesting permissions which apparently are sufficient for posting to a profile's wall, but not to a page's wall. Which permission(s) am I missing for posting to a page's wall? Thank you in advance for any help.
Best Answer
here's what you do. First, read the documentation on extended permissions. Notice that 'manage_pages' says:
This means you have to switch your user's access token based on the response from the
for your app. So once you have your PAGE ACCESS TOKEN, switch the request to post your message like such:
in postfields (using curl or some such), include your message and $PAGE_ACCESS_TOKEN