Hi!
After installing latest sdks and trying to log in fb using [PFFacebookUtils logInInBackgroundWithReadPermissions:] faced with error -
"No registered authentication delegate found for facebook authentication type. Register a delegate first via PFUser.registerAuthenticationDelegate(delegate, forAuthType:)"
But I'm not implementing any third party auth. Any chances you know what's the problem?
Thanks
Using FBSDKCoreKit (4.7.1)
Using FBSDKLoginKit (4.7.1)
Using FBSDKShareKit (4.7.1)
Using Parse (1.9.1)
Using ParseFacebookUtilsV4 (1.9.0)
Hey @alexvolchek, thanks for the report.
Any chance you can attach a piece of code from your app delegate where you set up Parse and ParseFacebookUtils?
I think the order there might be wrong...
This error surfaces at the moment where it tries to find a registered authentication provider (Facebook in this case, or rather, PFFacebookUtils) and it fails to do so. Which leads me to thinking that there is probably something wrong with the setup of PFFacebookUtils + Parse.
Thank you for your feedback. We prioritize issues that have clear and concise repro steps. Please see our Bug Reporting Guidelines about what information should be added to this issue.
Please try the latest SDK. Our release notes have details about what issues were fixed in each release.
In addition, you might find the following resources helpful:
@nlutsenko, I swapped Parse and PFFacebookUtils setups and seems it's working now(facepalm).
Thanks and sorry to bother you!
@alexvolchek I have the same problem as you, can you please describe the steps to remedy the issue?
@peterwarbo [PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:] should be after [Parse setApplicationId: clientKey:]
@alexvolchek Thanks I noticed it just before you wrote this reply :)
As stated "[PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:] should be after [Parse setApplicationId: clientKey:]". This fixes the problem for me too. However there is something nasty there. The callback returns no NSError and no PFUser. Spent 2 hours looking everywhere for the problem until I found the correct description in a catched NSException. Why is not this exception somehow propagated as NSError of the callback?
- (instancetype)pffb_continueWithMainThreadUserBlock:(PFUserResultBlock)block {
return [self pffb_continueWithMainThreadBlock:^id(BFTask *task) {
if (block) {
block(task.result, task.error);
}
return nil;
}];
}
Here you should check task.exception too if no task.result and no task.error!
@demosten, amazing catch!
Will update ParseFacebookUtils to surface the exception in a useful way! (just rethrow it)
@demosten, @nlutsenko I am experiencing this issue as well. I am using Parse via Parse Server. Why does this happen and how can I correct the problem?
Most helpful comment
@peterwarbo [PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:] should be after [Parse setApplicationId: clientKey:]