Setup Access Token for AUA Confessions app - AUA-tech/mobile_confessions GitHub Wiki
Get Page Access Token
- 1.0 You should be logged in FB as an admin user of AUA Confessions page
- 1.1 Go to the Graph API Explorer.
- 1.2 Select the "AUA Confessions" application you want to get the access token for (in the "Application" drop-down menu, not the "My Apps" menu).
- 1.3 Click "Get Token" > "Get User Access Token".
- 1.4 Click "Get Access Token".
- 1.5 Grant access from a Facebook account that has access to manage the target page. The token that appears in the "Access Token" field is your short-lived access token. Now it would be a little bit more complicated. Be very careful while doing all of these steps
- 1.6 You should copy paste this link in your browser and change {short_lived_token} to the token you've got in Graph API Explorer in steps 1.0 - 1.5 https://graph.facebook.com/v2.10/oauth/access_token?grant_type=fb_exchange_token&client_id={app_id}&client_secret={app_secret}&fb_exchange_token={short_lived_token} The response should look something like this:
{
"access_token" : "ABC123",
"token_type" : "bearer",
"expires_in" : 5183791
}
So the access_token that we've got is a long-lived access_token, but not permanent Let's continue:
- 1.7 Now you should copy that access_token, input it instead {long_lived_access_token} and run this link in browser https://graph.facebook.com/v2.10/me?access_token={long_lived_access_token} The response will contain your profile id under id field. We will need it in the next step
- 1.8 Now, insert id from 1.7 instead {account_id} and insert access_token from 1.6 instead {long_lived_access_token} https://graph.facebook.com/v2.10/{account_id}/accounts?access_token={long_lived_access_token}
- 1.9 now you should get a response with data array ( I really hope you're a CS student :D). You should find AUA Confessions page, and under it there should be written access_token. Send me that access_token :D