Reputation: 103
Few days back I was trying to refresh access token and observed for "Web" type of app the initial access token expiry time is around 2 hrs and for "native/desktop" type app its 25 hrs. But since today morning I am seeing that for native/desktop type app the initial access token expiry time is 60 days. So I was wondering if it is documented somewhere about the initial expiry time of an app in Facebook ?
Upvotes: 2
Views: 5254
Reputation: 3365
This blog post says that two hours is the default, but it can be refreshed for an additional 60 days
Upvotes: 2
Reputation: 31880
So I was wondering if it is documented somewhere about the initial expiry time of an app in Facebook ?
Yes, here's the current official documentation we have on the subject:
https://developers.facebook.com/docs/offline-access-deprecation/
Upvotes: 1
Reputation: 2910
There is a new option in App Advanced Settings: deprecate offline_access
If enabled the app will be issued long lived access token but you can't ask for offline_access. I believe after deprecation process is completed the expiry time will return to normals or they might leave it to 60 days.
Upvotes: 0
Reputation: 588
I don't think there is any official documentation that explains how the expiry time is calculated. However, when the access_token is passed to your application, you should also receive an "expires" parameter.
The expires parameter is the number of seconds until the token needs to be revalidated. When coding your app, make sure to record this and prompt the user to relink their profile when it expires.
Some notes:
You can request "offline_access" permission for infinite expiry time.
The token will automatically become invalidated if the user changes their password or deauthorizes your application from their privacy/security settings.
Upvotes: 0