facebook - How does an iOS app keep a FBSession from expiring? -
i have read fbsession automatically renews/refreshes it's token, looking through sdk time seems extend life of token when session open request returns new token expiration.
will session/token renewed result of other actions?
edit: in 'facebook' class there 'extendaccesstoken' method following comment:
/** * attempt extend access token. * * access tokens typically expire within 30-60 days. when user uses * app, app should periodically try obtain new access token. once * access token has expired, app can no longer renew it. app has * ask user re-authorize obtain new access token. * * ensure app has fresh access token active users, it's * recommended call extendaccesstokenifneeded in application's * applicationdidbecomeactive: uiapplicationdelegate method. */
but method seems separate fbsession.
by using fbsession token, token extended automatically newest sdk: https://github.com/facebook/facebook-ios-sdk/blob/master/src/fbsession.m#l236-l260
Comments
Post a Comment