1
votes

I am getting users access token while users login into facebook through our site and using that access token for posting or publishing feeds to users wall.

So I generated a long lived access token using facebook api's with the help of short lived access token which is generated while facebook login in our site. But the life span of long lived access tokens of facebook is only 60 days. So can anyone suggest how to revoke or refresh or renew this long lived access token after 60 days using facebook api not by using facebook sdk?

1

1 Answers

1
votes

You can revoke all privileges for an app by making a Graph API call that deletes all permissions: HTTP DELETE to me/permissions.

However, the only way to extend long-lived access token is, as described here, by sending the person back to the login flow used by your app. Note that the person will not actually need to login again, they have already authorized the app, so they will immediately redirect back to the app from the login flow with a refreshed (short-lived) token. Then, you can exchange this short-lived token to a long-lived one.