CopyPastor

Detecting plagiarism made easy.

Score: -1; Reported for: Open both answers

Possible Plagiarism

Reposted on 2016-08-31
by Faisal

Original Post

Original - Posted on 2016-08-27
by Faisal



            
Present in both answers; Present only in the new answer; Present only in the old answer;

Having found that it is possible to generate a Facebook Page Access Token that does not expire, here is a clear, step-by-step quide for all those looking to the same issue:
1. Make sure you are the admin of the FB page you wish to pull info from 2. Create a FB App (should be with the same user account that is the page admin) 3. Head over to the Facebook Graph API Explorer 4. On the top right, select the FB App you created from the "Application" drop down list 5. Click "Get User Access Token" (Orginally was "Get Access Token") 6. Make sure you add the manage_pages permission 7. Convert this short-lived access token into a long-lived one by making this Graph API call: `https://graph.facebook.com/oauth/access_token?client_id=<your FB App ID >&client_secret=<your FB App secret>&grant_type=fb_exchange_token&fb_exchange_token=<your short-lived access token>`
8. Grab the new long-lived access token returned back 9. Make a Graph API call to see your accounts using the new long-lived access token: `https://graph.facebook.com/me/accounts?access_token=<your long-lived access token>` 10. Grab the access_token for the page you'll be pulling info from 11. Lint the token to see that it is set to Expires: Never!
That should do it. You should now have a Facebook Page Access Token that doesn't expire! This is working for me.
Having found that it is possible to generate a Facebook Page Access Token that does not expire (see the 'Extending Page Access Tokens' section in the [documentation][fbdoc1]), here is a clear, step-by-step guide for all those looking to the same:
1. Make sure you are the admin of the FB page you wish to pull info from 2. Create a FB App (should be with the same user account that is the page admin) 3. Head over to the Facebook Graph API Explorer 4. On the top right, select the FB App you created from the "Application" drop down list 5. Click "Get Access Token" 6. Make sure you add the `manage_pages` permission 7. Convert this short-lived access token into a long-lived one by making this Graph API call: `https://graph.facebook.com/oauth/access_token?client_id=<your FB App ID >&client_secret=<your FB App secret>&grant_type=fb_exchange_token&fb_exchange_token=<your short-lived access token>`
8. Grab the new long-lived access token returned back 9. Make a Graph API call to see your accounts using the new long-lived access token: `https://graph.facebook.com/me/accounts?access_token=<your long-lived access token>` 10. Grab the access_token for the page you'll be pulling info from 11. Lint the token to see that it is set to Expires: Never!
That should do it. You should now have a Facebook Page Access Token that doesn't expire!


[fbdoc1]: https://developers.facebook.com/docs/facebook-login/access-tokens/expiration-and-extension

        
Present in both answers; Present only in the new answer; Present only in the old answer;