I want to show the last facebook post on my website. I have a script for it but it needs access token to work.
I followed the steps mentioned in this post:
h
when i'll open https://graph.facebook.com/me/accounts...
You need to open it in the Graph API Explorer and add the access token retrieved in the earlier step or append it to end of the url
https://graph.facebook.com/me/accounts?access_token=XXXX
1: Create an application in facebook with your website url
2: Run this link in your browser
3: Visit the following to generate a new SHORT-LIVED (1 hour) access token:
https://www.facebook.com?client_id=[APPID]&client_secret=[APPSECRET]&redirect_uri[http://APPURL]&scope=manage_pages,read_stream&response_type=token
4: Take that short-lived access token and send it here:
https://graph.facebook.com/oauth/access_token?client_id=[APP_ID]&client_secret=[APP_SECRET]&grant_type=fb_exchange_token&fb_exchange_token=[EXISTING_ACCESS_TOKEN]
5: Then, either in FB’s Graph API Explorer or on your own, visit here:
https://graph.facebook.com/me/accounts?access_token=[TOKEN]
Then paste the token and id in the code, then you will get the result.
You can debug and verify the expiration date of your token using the FaceBook Access Token Debugger: