The Facebook SDK for iOS 6 mandates that you ask for Read Permissions before Publish Permissions, and suggests strongly that you only ask for Publish Permissions in context. I, however, am not using FB login for login or anything related to read permissions, I just want people to be able to publish behavior in the app.
I want to simply ask for read permissions and then immediately ask for publish permissions in the native permissions dialog. The only way I've found to do it is by modifying the FBLoginView (which is the login view that comes packaged with the app), but I want to do it my own button that, if the user is logged in, posts to FB.
This it the call I have now
[appDelegate openSessionWithAllowLoginUI:YES];
Which calls this in the delegate
- (BOOL)openSessionWithAllowLoginUI:(BOOL)allowLoginUI {
NSArray *permissions = [[NSArray alloc] initWithObjects:
@"email",
@"user_likes",
nil];
return [FBSession openActiveSessionWithReadPermissions:permissions
allowLoginUI:allowLoginUI
completionHandler:^(FBSession *session,
FBSessionState state,
NSError *error) {
[self sessionStateChanged:session
state:state
error:error];
}];
}
How do I either modify that function OR immediately call an "openActiveSessionwithPublishPermissions" function after the read permissions are authorized?