How exactly do I re-enable (or get another) access token for facebook?
My profiles access token- it expired and has become useless. I cant seem to get another access token for my account that isn't expired. How would I go about re-enabling an access token for my facebook account? I've heard about entering lines of code into facebook, but I had no idea that you could write code in facebook and wouldn't know how to navigate to the code writing page.
- Anonymous6 years agoBest Answer
Generating Long-Lived User Tokens from Server-Side Long-Lived Tokens
Facebook has an advanced option for obtaining long-lived access tokens for apps that:
Have their own authentication system (using a username/password for example)
Store, on their servers, a Facebook access token for people using it that they send to different clients (browser or native mobile apps)
Make API calls from all of those clients
If your app is set up like this it should use the process described here to obtain an access token from each client to avoid triggering Facebook's automated spam systems. The end result will be that each client will have its own long-lived access token.
At a high level, this is how you can obtain a long-lived token from the client:
Make a call to Facebook's server from your server using a valid and current long-lived token to generate a code. (This assumes you've already obtained a long-lived token via Facebook Login. If the token you're using is invalid or expired, you'll have to obtain a new one by making the person using your app log in again.)
Securely send that code to the client.
The client then exchanges the code for a long-lived token.
The client can use the long-lived token to post stories or query data.
- 6 years ago
The best I am aware of is max 60 days token . After 60 days you will have to follow below mentioned steps again to generate access Token : http://sharepoint.asia/how-to-generate-facebook-to...