Search code examples
iosiphonefacebookfacebook-graph-apifacebook-ios-sdk

IOS how to get Facebook extended permission dialog


I'm creating an iPhone app that will publish photos to the Facebook pages on behalf of the user(where the user is the administrator). In order to do that I need to pop up the dialog (that user can give permission to my app) to manage_pages. How can I do that? Im using the latest Facebook SDK, Any help.


Solution

  • NSArray *permissions = 
    [NSArray arrayWithObjects:@"manage_pages", nil];
    
    [[FBSession activeSession] reauthorizeWithReadPermissions:permissions
                                        completionHandler:^(FBSession *session, NSError *error) {
                                            /* handle success + failure in block */
                                        }];