Skip to main content

Posts

Showing posts from June, 2012

Post on behalf of Facebook Page using Graph API

Assuming someone would like to give your permissions to post on his Facebook Pages :-), you need to do following things: Ask for the publish_stream and manage_pages using Facebook Authentication Dialog Get Page Access Token. Such access token can be retrieved by issuing an HTTP GET to /USER_ID/accounts with the manage_pages permission. This will bring you list of the pages and access tokens of such pages. You also can you /PAGE_ID?fields=access_token request to get access token for specific page. (Reference - https://developers.facebook.com/docs/reference/api/page/) Once you have page access token you will be able to post. Posting can be done using following parameters: curl -F 'access_token={ACCESS_TOKEN}' \ -F 'message={MESSAGE TO POST}' \ https://graph.facebook.com/{PAGE}/feed