FB SDK 3.0我需要扩展访问令牌还是自动的? [英] FB SDK 3.0 Do I need to extend access token or is it automatic?
问题描述
根据 http://developers.facebook.com/roadmap/offline-access-removal/异常(部分)3:如果我使用较新的SDK,它会保存我的访问令牌,并自动扩展。
Based on http://developers.facebook.com/roadmap/offline-access-removal/ Exception (Section) 3: If I use the "newer" SDK, it'll save the access token for me and will extend it automatically.
我的问题:
[1]当它说较新的SDK时 - 有谁知道这是否指3.0?
[1] When it says "newer" SDK - does anyone knows whether this is referring to 3.0?
[2]有没有办法手动分配FBSession一个访问令牌? FBSession的accessToken属性是只读的。我的情况:在我的应用程序用户登录使用他们的电子邮件地址,而在我的服务器上,电子邮件地址链接到Facebook访问令牌。现在如果用户在另一台设备上登录我的应用程序,我的服务器将在验证响应中返回FB访问令牌;我希望FBSession被分配这个相同的访问令牌,所以他们不必重新认证FB,希望访问令牌扩展过程只是神奇地发生。
[2] Is there a way to manually assign FBSession an access token? FBSession's accessToken property is read-only. My situation: in my app user logs in using their email address, and on my server the email address is linked to a facebook access token. Now if user logs in to my app in another device, my server will return FB access token in auth response; I would like FBSession to be assigned this same access token so they don't have to reauthenticate FB and hope the access token extending process is just happening magically.
推荐答案
很确定你不用担心了。看看代码,FBSession负责扩展令牌&到期日。
Pretty sure you don't have to worry about anymore. Looking at the code, FBSession takes care of extending the token & expiry date.
https://github.com/facebook/facebook-ios-sdk/blob/master/src/FBSession.m
这篇关于FB SDK 3.0我需要扩展访问令牌还是自动的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!