FB 4.0 - FBSession openActiveSessionWithReadPermissions replacement

拟墨画扇 提交于 2019-12-07 06:33:32

问题


I was previously using Facebook SDK 3.x for iOS. My code has FBSession openActiveSessionWithReadPermissions in various places, and now that I am using version 4.x I'm not sure what the replacement is

I am thinking it is the login methods but I'm not sure what the 1:1 replacement/equivalent is.


回答1:


Correct. You can convert over to using the following FBSDKLoginManager method:

- (void)logInWithReadPermissions:(NSArray *)permissions handler:(FBSDKLoginManagerRequestTokenHandler)handler;

Or if looking for publishing permissions you can use:

- (void)logInWithPublishPermissions:(NSArray *)permissions handler:(FBSDKLoginManagerRequestTokenHandler)handler;


来源:https://stackoverflow.com/questions/30879330/fb-4-0-fbsession-openactivesessionwithreadpermissions-replacement

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