Access a Facebook Page from an External Facebook webpage app
I'm building a webpage Facebook app, I need the app to access a Facebook page and access and display user posts from the page. I have admin control of the Facebook page.
How should I go开发者_高级运维 about achieving this: If I add my Facebook app webpage as a App on my Facebook page will it be able to access the information on the Facebook page?
You will have to grant your application the "manage_pages" permission :
https://www.facebook.com/dialog/oauth? client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&scope=manage_pages&response_type=token
once you have that permission you can make a request for an access token :
https://graph.facebook.com/oauth/access_token?
client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&
grant_type=client_credentials
With this access token you can make requests to the graph api as your page... You can read more here on the authentication documentation. Look for "App login" and "Page login"
精彩评论