Skip to content

Latest commit

 

History

History
46 lines (28 loc) · 1.63 KB

fb.md

File metadata and controls

46 lines (28 loc) · 1.63 KB

FB app

https://developers.facebook.com/apps/

FB access token - page access token

Use long lived access token

Src: https://www.contentecontent.com/blog/2015/05/post-from-server-to-facebook-page-with-php-sdk-4/ http://www.devils-heaven.com/facebook-access-tokens/

User access token

For posting on users wall:

https://www.facebook.com/dialog/oauth?client_id=APP_ID_NUM&scope=manage_pages,email,user_posts,publish_actions&response_type=token&redirect_uri=http://localhost

  • Collect the short lived access token from the response
  • Extend the token to 60 days by issuing GET request to:

https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token&client_id=APP_ID&client_secret=APP_SECRET&fb_exchange_token=SHORT_LIVED_TOKEN

  • Collect long lived token

Resources:

Graph API