Do Facebook Oauth 2.0 Access Tokens Expire?

后端 未结 13 1204
Happy的楠姐
Happy的楠姐 2020-11-27 09:32

I am playing around with the Oauth 2.0 authorization in Facebook and was wondering if the access tokens Facebook passes out ever expire. If so, is there a way to request a l

13条回答
  •  天命终不由人
    2020-11-27 10:19

    After digging around a bit, i found this. It seems to be the answer:

    Updated (11/April/2018)

    • The token will expire after about 60 days.
    • The token will be refreshed once per day, for up to 90 days, when the person using your app makes a request to Facebook's servers.
    • All access tokens need to be renewed every 90 days with the consent of the person using your app.

    Facebook change announce (10/04/2018)

    Facebook updated token expiration page (10/04/2018)

    offline_access: Enables your application to perform authorized requests on behalf of the user at any time. By default, most access tokens expire after a short time period to ensure applications only make requests on behalf of the user when the are actively using the application. This permission makes the access token returned by our OAuth endpoint long-lived.

    Its a permission value requested.

    http://developers.facebook.com/docs/authentication/permissions

    UPDATE

    offline_access permission has been removed a while ago.

    https://developers.facebook.com/docs/roadmap/completed-changes/offline-access-removal/

提交回复
热议问题