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

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 token without having to call the [Facebook authorize...] method again - which shows an empty Facebook dialog briefly if the user had previously logged in? What I want to avoid is requiring the user to re-login to FB each time they use the app - say, day to day.

I am already saving / restoring oAuth tokens when the app exits / starts. And I can check to see if the token is valid using [Facebook isSessionValid], or by checking the expire time on the token. But what to do if the token has expired? I've read that it is possible to "refresh" the token, but I don't understand how this is done.

I don't want to request "offline_access" permission, which would give me a "forever" token.

Help!?

14
задан TomSwift 31 August 2010 в 15:40
поделиться

1 ответ

Просто выполните [[[[сессия FBSession]resume]] если возвращается false, выполните вход снова

0
ответ дан 1 December 2019 в 16:31
поделиться
Другие вопросы по тегам:

Похожие вопросы: