PFFacebookUtils logInWithPermissions fails first time, works second time

I am calling logInWithPermissions with default permissions, without any PFUser in the data browser and permissions removed directly from Facebook.

Code triggered by login button action:

NSArray *permissionsArray = @[ @"public_profile", @"email", @"user_friends"];

[PFFacebookUtils logInWithPermissions:permissionsArray block:^(PFUser *user, NSError *error) {
    // show an alert in case of error
}];

      

The first attempt returns the error "com.facebook.sdk" - code: 5 , without asking for Facebook permission.

The second attempt asks for Facebook permissions and after confirmation, the PFUser is generated and displayed in the data browser.

Does anyone have the same problem?


I am using cocoapods with Parse v1.6 and ParseFacebookUtils v1.6 and I followed https://www.parse.com/docs/ios_guide#fbusers/iOS guide

+3


source to share





All Articles