Skip to content

Instantly share code, notes, and snippets.

@peteroravec
Last active December 25, 2016 19:46
Show Gist options
  • Save peteroravec/1c8f9e7c6eb5748f6ccb01ec133857dd to your computer and use it in GitHub Desktop.
Save peteroravec/1c8f9e7c6eb5748f6ccb01ec133857dd to your computer and use it in GitHub Desktop.
FB API: How to create never-expiring token for posting to FB page
Steps how to create never expiring token for posting to FB page
---------------------------------------------------------------
1.) Go to https://developers.facebook.com/tools/explorer/
2.) Select you application from dropdown
3.) Click GET USER ACCESS TOKEN
4.) Select MANAGE PAGES permission
5.) Call GET on /me/accounts
6.) Find PAGE where you want to post
7.) COPY access token
8.) Go to https://developers.facebook.com/tools/debug/accesstoken
9.) Paste your token and click DEBUG
10.) Click on EXTEND THIS TOKEN button
---------------------------------------------------------------
How to post to page?
POST -> /PAGE_ID/feed
fieds: message, link
+ your generated access token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment