FB 4.0 - FBSession openActiveSessionWithReadPermissions replacement

2.1k views Asked by At

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

There are 1 answers

1
Tommy Devoy On BEST ANSWER

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;