This is next post working with Facebook Graph API series, Previously I have posted about gettting access token and use it to get Facebook Profile detail and Posting status on your Facebook Timeline using restfb Facebook Graph API
Go through previous posts for better understanding of this blog post
Now this post is about Facebook Pages , Facebook Page is a way to connect people to promote your brand, website, business, cause etc. This post uses no new code , Posting on pages is same as updating status on Facebook Timeline .
The only difference is of access tokens, For Timeline status posting we use User Aceess Token but for managing pages we need to use Page Access Token .
Open Grpah API Explorer and Click on Get Page Access Token
When we ask for Page Access Token, Graph API asks permission to manage pages
Next step is to click on Get User Access Token for some more permissions
As our requirement is to post on pages so for that we need to grant permission for this- publish_pages
Grant permission to Graph API to publish as pages
After this a token is generatd that is user access token with permissions of manageing and publishing as pages
Change in GET Request and write me/accounts to get details of all pages managed by you
Check after clicking on Post button and see on Page
If you want to post on your page wall under visitors post using your name then use User Acees Token and Page Id (ID of page on that you want to post) to post