Do Facebook Oauth 2.0 Access Tokens Expire?

后端 未结 13 1193
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:09

    I don't know when exactly the tokens expire, but they do, otherwise there wouldn't be an option to give offline permissions.

    Anyway, sometimes requiring the user to give offline permissions is an overkill. Depending on your needs, maybe it's enough that the token remains valid as long as the website is opened in the user's browser. For this there may be a simpler solution - relogging the user in periodically using an iframe: facebook auto re-login from cookie php

    Worked for me...

提交回复
热议问题