Closed another-novelty closed 3 years ago
I have the same problem
Did you change AppDelegate.swift
? This work well.
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
if CAPBridge.handleOpenUrl(url, options) {
return FBSDKCoreKit.ApplicationDelegate.shared.application(app, open: url, options: options)
}
else{
return false
}
}
Yeah, I tried both your method as well as the one provided by Facebook.
FBSDKCoreKit.ApplicationDelegate.shared.application just returns false. Returning true manually also does not close the dialog.
As I said, having the official facebook app installed is mandatory. Authentication with the browser works fine.
Ok I think I've got it. The issue was, that I was using the SDK provided by the swift package manager, as is instructed by facebook. I removed the dependency, switched to the cocoa pods and it seemingly worked.
I will test a little bit more, but it would probably be a good Idea to add this to the documentation.
Describe the bug The AppDelegate function of the FBSDK refuses to handle the returned Intent.
To Reproduce Steps to reproduce the behavior:
Expected behavior The Dialog should close and provide the auth info to the app.
Smartphone (please complete the following information):
Additional context Official Facebook app is required. Authorization through safari works just fine but is disabled when the app is installed. Returned URL is (omitting IDs) fb://authorize#denied_scopes=&granted_scopes=email%2Cpublic_profile&graph_domain=facebook&nonce=&signed_request=&state=%7B%22challenge%22%3A%22xn1%252FW870hI2L16%253D0EtIa87a6Wjo%253D%22%2C%220_auth_logger_id%22%3A%2212F0D8C6--304804A65CA4%22%2C%22com.facebook.sdk_client_state%22%3Atrue%2C%223_method%22%3A%22sfvc_auth%22%7D