how to refresh an oauth token when using the Facebook iPhone SDK

前端 未结 6 2008
被撕碎了的回忆
被撕碎了的回忆 2021-02-04 07:18

I\'m using the Facebook SDK for iOS in my app: http://github.com/facebook/facebook-ios-sdk

The oAuth token expires after about 2 hours. How can I \"refresh\" the oAuth

6条回答
  •  -上瘾入骨i
    2021-02-04 08:08

    As per the Facebook SDK documentation:

    The Facebook SDK automatically refreshes the user's session if necessary. When it does this, the state also transitions to the FBSessionStateOpenTokenExtended state.

    Also to further clarify (since SDK version 3.1):

    The SDK refreshes session automatically on API calls.

    It also refreshes the token data as needed when follow-on authentication or Facebook API calls made using the SDK.

提交回复
热议问题