logo

FACEBOOK ACCESS TOKEN

For Diamond Social Feed

Summary

Step-by-step tutorial for getting Facebook Access Token to integrate your Facebook page into your Diamond Social Feed

1. Register

Follow this link https://developers.facebook.com/apps and press Register Now button

Facebook Access Token 1

2. Create Developer's account

Click Next button

Facebook Access Token 2

3. Name your App

Choose the name of your app and type your Email. Then click Next button

Facebook Access Token 3

4. Become a developer

Choose Developer tab

Facebook Access Token 4

5. Graph API Explorer

Now, navigate to https://developers.facebook.com/tools/explorer, and select an app from Application drop-down.

Facebook Access Token 5

6. Get User Access Token

Select Get User Access Token from Get Token drop-down to generate short-lived access token.

Facebook Access Token 6

7. Select permissions for your Access Token

Once you click on Get User Access Token in the drop down you will see a pop-up window like below. There you will be able to select the permission(scopes) for the user access token. Choose:

Then generate user access token by clicking on Get Access Token. Confirm all the requests, this will create short-lived user access token.

Facebook Access Token 7

8. Open Access Token Tool

Navigate to https://developers.facebook.com/tools/accesstoken, you will see short-lived user access token and app access token for all the apps you have under your account. Press Debug option at right side of the user access token of the current app we are trying to create a long-lived access token.

Facebook Access Token 8

9. Extend your Access Token

Here you can see full information about your user access token. Short-lived user access token means that it will expire after an hour. So to extend the expiry date, we need to go to the bottom, there is an option to generate long-lived(2 months) user access token. Click on Extend Access Token button.

Facebook Access Token 9

10. Long-lived Access Token

Now we have got a long-lived user Access Token that will expire after 2 month. Generally, you can already use it in your Diamond Social Feed but don't forget to generate new one after expiring.

You can also try to get never expiring Access Token. Note, that to do this, you need to be both page admin and the app admin. Select the whole access token, copy it and follow recent steps.

Facebook Access Token 10

11. Never expiring Access Token

Again, go to https://developers.facebook.com/tools/explorer and paste the recently created long-lived user access token in the Access Token field.

Now, we need to change the API endpoint to access me/accounts and click on Submit button. This process will show the result with all pages information including page access token i.e Never expiring user Access Token

Facebook Access Token 11

12. Verificate your Access Token

To make sure that your Access Token is never expiring navigate to https://developers.facebook.com/tools/debug/accesstoken once again. Paste your Access Token in the Debug field and press Debug button.

Facebook Access Token 12

If Expires value is Never - congratulations: you finally got your Never expiring Access Token.

Now you can use it in your Diamond Social Feed