This is very weird. I'm trying to login to Facebook and everything is working fine if there's no Facebook app is installed on the device. But if there's this app then nothing happens. Just nothing. Completion block is never called and no login dialog appears. This is my very simple code:
[PFFacebookUtils logInInBackgroundWithReadPermissions:@[@"public_profile"] block:^(PFUser *user, NSError *error)
{
NSLog(@"Completion");
}];
I also have this code inside applicationDidFinishLauncing
:
[Parse setApplicationId:kPAParseApplicationId clientKey:kPAParseClientKey];
[PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:launchOptions];
and I have the following method implemented:
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
return [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation];
}
I also need to note the following: sometimes, very rarely, it works even with the app installed. Works and then again stops working without any reason. Did anyone encounter such a problem? Thanks!