Closed elhui2 closed 1 year ago
@elhui2 In my opinion you don't need the next code in your AppDelegate.swift
override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
let facebookAppId: String? = Bundle.main.object(forInfoDictionaryKey: "FacebookAppID") as? String
if facebookAppId != nil && url.scheme!.hasPrefix("fb\(facebookAppId!)") && url.host == "authorize" {
print("AppDelegate-> is login by facebook")
return ApplicationDelegate.shared.application(app, open: url, options: options)
}
return false
}
You only should override that function if you have conflicts with another auth flows like Twitter.
Thanks a lot for take a look. I removed the code an got the same error:
-canOpenURL: failed for URL: "fbapi:/" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"
Current AppDelegate.swift
import UIKit
import Flutter
import Firebase
import GoogleMaps
import FBSDKCoreKit
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GMSServices.provideAPIKey("XXXXXXXXXXXXXXX")
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
@elhui2 sorry But I am not able to reproduce the issue, could you add the dart code that are you using? Also if you can provide me a temporally access to your project to run in my local machine to reproduce the issue that will be great
@darwin-morocho of course, now you have the access to the repo, thanks for all.
The file of login is:
lib/library/facebook_login_button.dart
Any feedback is very welcome, it's my first app in the stores. Regards
@elhui2 finally this is not an issue of this plugin so I'm closing this
The app is in developer mode. so i can login with my account in android but not in iOS.
Please can you change the text of my api key in your previous response?
The app is in developer mode. so i can login with my account in android but not in iOS.
Please can you change the text of my api key in your previous response?
I have deleted the comment
What version are you using?
5.0.7
What OS and version are you using to local deploy your application?
Mac OS 12.4
What platforms are you seeing the problem on?
iOS
pubspec.yaml
Describe the Bug
Hello I’m working with flutter_facebook_auth V ^5.0.7, I made all the configurations for Android and iOS, in Android the login works like charm (with this I rule out the miss configuration of facebook app panel)
In the flutter log don’t apear any errors but in the Xcode the log launch:
-canOpenURL: failed for URL: "fbapi:/" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"
In the screen only appear the classic error in the top on a red ribbon. “Login Error: There is an error in loggin you into this application. Please try again latter”
I Read this links but i can’t find the solution
https://github.com/darwin-morocho/flutter-facebook-auth/issues/206 https://github.com/darwin-morocho/flutter-facebook-auth/issues/6 https://github.com/darwin-morocho/flutter-facebook-auth/issues/261
AppDelegate.swift
Expected Behavior
The success of the login on facebook
To Reproduce
On click in the Facebook Login.
Relevant log output
flutter doctor -v
Info.plist (iOS)
Podfile (iOS)
AndroidManifest.xml
No response
MainActivity.java
No response
MainActivity.kt
No response
index.html
No response
Info.plist (macOS)
No response