I am trying to post to Facebook using openActiveSessionWithPublishPermissions , so if the user is not logged in, he needs to log in first and then post using the native io6 Facebook dialog.
What I found, I can log in, but the completion handler is not called.
Another thing that I noticed is that when I click on the login button again, it calls the exit handler with the following error FBSessionStateClosedLoginFailed .
I referred to this post , but still have not found a solution to my problem.
NSArray *permissions = [NSArray arrayWithObjects:@"publish_stream", nil]; [FBSession openActiveSessionWithPublishPermissions:permissions defaultAudience:FBSessionDefaultAudienceEveryone allowLoginUI:YES completionHandler: ^(FBSession *session, FBSessionState status, NSError *error) { switch (status) { case FBSessionStateOpen: { [FBNativeDialogs presentShareDialogModallyFrom:currentController initialText:nil image:nil url:nil handler:^(FBNativeDialogResult result, NSError *error) {}]; } break; default: break; } }];
source share