I'm trying to implement Facebook login with Parse and I get the following error message:
[Error]: Permission denied for this action. (Code: 119, Version: 1.14.2)
I have already added my application's Facebook Application ID to my Parse application's settings page, linked my app to the Facebook SDK, and added the FacebookAppID and URL Scheme values to my .plist file.
This is the code I'm using to try and login (directly from Parse). http://parseplatform.github.io/docs/ios/guide/#log-in--sign-up
NSArray *permission = [NSArray arrayWithObjects:@"public_profile", @"email", @"user_friends", nil];
[PFFacebookUtils logInInBackgroundWithReadPermissions:permission block:^(PFUser *user, NSError *error) {
NSLog(@"Error: %@", error.description);
if (user) {
NSLog(@"Uh oh. The user cancelled the Facebook login.");
} else if (user.isNew) {
[self performSegueWithIdentifier:@"signInSuccessful" sender:nil];
NSLog(@"User signed up and logged in through Facebook!");
} else {
[self performSegueWithIdentifier:@"signInSuccessful" sender:nil];
NSLog(@"User logged in through Facebook!");
}
}];