3
votes

I want to create a long term page access token. I have followed these steps.

Find your user Token(2 Hours) developers.facebook.com/tools/access_token/

Generate long term Token (2 months) 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

EXISTING_ACCESS_TOKEN is what you get from Find your user Token above.

Page Access Token

Go to https://developers.facebook.com/tools/explorer?method=GET&path=me%2Faccounts Plug in long term access token Enter https://graph.facebook.com/me/accounts in the second text box Click on submit Json data will be returned From that select the access token of your Fan page

My problem is that when I enter in the long term access token the Graph API Explorer I only get back the name , category and id. And not the access token. Which leads me to believe the long access token does not have the manage_pages permission but when I go to set it. I get back a short term token with the permission set.

Any ideas?

1

1 Answers

1
votes

Are you sure that you're not using the wrong token or the wrong permissions on the request to /me/accounts?

Check with a call to /app (to see if it's the correct app) and /me/permissions to check it's the right permissions, provided you have the the manage_pages permission and it's the long-expiry token (which you can check in Facebook's Debug Tool) it should be OK