FB SDK 3.0 Do I need to extend access token or is it automatic?

倾然丶 夕夏残阳落幕 提交于 2019-12-07 06:35:09

问题


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.

My questions:

[1] When it says "newer" SDK - does anyone knows whether this is referring to 3.0?

[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.


回答1:


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



来源:https://stackoverflow.com/questions/11623047/fb-sdk-3-0-do-i-need-to-extend-access-token-or-is-it-automatic

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