This is next post working with Facebook Graph API series and is about how to post to Facebook page wall, Previously I have posted about getting 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 the 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
Here you can see different access token and id for each page Now use access token and id of any page to post status
Cheers 🙂 Happy Learning
An Oracle ACE, Blogger, Reviewer, Technical Lead working on Oracle ADF