Trying to login using Facebook + Parse using the following code:
I noticed that when I click the "Login with Facebook" button, this appears twice in the console.
-canOpenURL: failed URL: "fbauth2: //" - error: "This application is not allowed to request for the fbauth2 scheme"
Here is my code:
- (IBAction)loginWithFacebook:(id)sender { // Set permissions required from the facebook user account NSArray *permissionsArray = @[ @"user_about_me", @"user_relationships", @"user_birthday", @"user_location"]; // Login PFUser using Facebook [PFFacebookUtils logInWithPermissions: permissionsArray block:^(PFUser * _Nullable user, NSError * _Nullable error) { if (!user) { NSLog(@"Uh oh. The user cancelled the Facebook login."); } else if (user.isNew) { NSLog(@"User signed up and logged in through Facebook!"); } else { NSLog(@"User logged in through Facebook!"); } }]; }
I added this to my plist, as in other topics, but still getting the same error. [[CHANGE ANSWER BELOW ARTIFICIAL NUMBER]]
<key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLSchemes</key> <array> <string>fb991863067537019</string> </array> </dict> </array> <key>FacebookAppID</key> <string>991863067537019</string> <key>FacebookDisplayName</key> <string>Ziplyne</string> <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>facebook.com</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSExceptionRequiresForwardSecrecy</key> <false/> </dict> <key>fbcdn.net</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSExceptionRequiresForwardSecrecy</key> <false/> </dict> <key>akamaihd.net</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSExceptionRequiresForwardSecrecy</key> <false/> </dict> </dict> </dict> <key>LSApplicationQueriesSchemes</key> <array> <string>fbapi</string> <string>fb-messenger-api</string> <string>fbauth2</string> <string>fbshareextension</string> </array>
source share