0

Probably I am overlooking something, but I cannot find where I can set the mode in which the extra permissions are requested from the user with the iOS Facebook SDK.

I am requesting additional publishing permissions with the code from below (and yes, I've set facebookLoginView.loginBehavior = FBSessionLoginBehaviorUseSystemAccountIfPresent; for the login), but the extra permission request doesn't pop up in the app, instead it opens up the facebook application. Any idea how to use the built in popup for this request?

if ([[FBSession activeSession] isOpen])
{
    NSArray *permissions = [[FBSession activeSession] permissions];
    NSArray *newPermissions = @[@"publish_stream"];

    if (![permissions containsObject:@"publish_stream"])
    {
        [[FBSession activeSession] requestNewPublishPermissions:newPermissions defaultAudience:FBSessionDefaultAudienceEveryone completionHandler:^(FBSession *session, NSError *error) {
            if (error == nil)
            {
                [[NSNotificationCenter defaultCenter] postNotificationName:@"FacebookWritePermissionsGranted" object:nil userInfo:nil];
            }
        }];
    }
}
Lehel Medves
  • 527
  • 1
  • 5
  • 15
  • hi..are you trying to check that is active session is open or not? m i right? –  May 09 '14 at 10:23
  • Hi! No, I know, that the session is open, I am trying to ask for extra publishing permissions from the user and for that, the native popup should be shown saying, that my app wants to access XY. – Lehel Medves May 09 '14 at 12:31

0 Answers0