Migrating existing access tokens to Facebook iOS SDK 3.0

痴心易碎 提交于 2019-12-05 06:22:11

I have upgraded an app with the facebook SDK 3.0 and it worked just fine. The Facebook SDK handles the token itself, but you can still access the accessToken.

You can reach it any time like so:

NSString *accessToken = [FBSession activeSession].accessToken;

This will return the accessToken or a nil if no token is set. You can even define a token caching ruleset on the session. Enjoy.

thien

The answer is in another post by my colleague. We were able to upgrade users from SDK pre 3.0 to 3.1 without needing users to re-login. It involves the use of the FBSessionManualTokenCachingStrategy:

how to avoid logging users out when migrating from iOS Facebook 2.x -> 3.x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!