I wonder how can I confidently keep my Facebook access token always active.
Is it enough to subscribe to token updates with AccessTokenTracker
, or it's also/instead need to check token expiration before every call to API with AccessToken.isExpired()
and then refresh token by AccessToken.refreshCurrentAccessTokenAsync(callback)
?
For example: would AccessTokenTracker
bring new access token after app has started? It means, that token has been expired when app was closed.
通过在每次调用Facebook API之前检查AccessToken.isExpired()
解决,然后在令牌过期时调用AccessToken.refreshCurrentAccessTokenAsync
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.