roughike / flutter_facebook_login

A Flutter plugin for allowing users to authenticate with native Android & iOS Facebook login SDKs.
BSD 2-Clause "Simplified" License
404 stars 332 forks source link

Facebook not login with install facebook app in flutter #254

Closed harithany closed 4 years ago

harithany commented 4 years ago

I had installed a Facebook login in my flutter app . and everything alright. but when install Facebook app. login square show and when press login nothing does and not log in. why?

AlanChaves commented 4 years ago

Também estou tendo o mesmo problema, só funciona como web.

Jenry94 commented 4 years ago

same issue

smocken78 commented 4 years ago

i just tested this usecase on iOS device and the login works fine. Is this error occuring on android devices or on iOS devices as well?

I am curious because i received an email from facebook, complaining about a non working login.

AlanChaves commented 4 years ago

Você tem que vincular sua conta do Facebook na conta de desenvolvedor no console do Facebook e depois o hash da sua aplicação e funciona.

Obrigado.

Em dom, 29 de mar de 2020 19:05, smocken78 notifications@github.com escreveu:

i just tested this usecase on iOS device and the login works fine. Is this error occuring on android devices or on iOS devices as well?

I am curious because i received an email from facebook, complaining about a non working login.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/roughike/flutter_facebook_login/issues/254#issuecomment-605709019, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALKSGPG5UC4QOIEGUYR3D6DRJ7A2RANCNFSM4LSBIS5Q .

danilof commented 4 years ago

Same issue here. Not working on android. Please fix this - we need to publish our app and this is must have.

danilof commented 4 years ago

I found work round - redirect to FB web view like this: final facebookSignIn = FacebookLogin(); facebookSignIn.loginBehavior = FacebookLoginBehavior.webOnly; ... Now it works!

gianlucainnocente commented 4 years ago

Same problem. On ios it uses Webview, and it is ok. But on android it doesn't use the installed Facebook app.

Kiruel commented 4 years ago

@danilof Your workarround works. Btw, this error appear when I have the Facebook app installed to my device and I'm login to it.

image0

gianlucainnocente commented 4 years ago

Same problem :(

vikas-shrma commented 4 years ago

hi Guys i solved this problem You need to get Key hash From SHA-1 Key and all working fine

buidan commented 3 years ago

For iOS, I found a working solution by add some extra code to AppDelegate.swift

override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
         if url.scheme == "fbXXXXXXXXX" {
                return ApplicationDelegate.shared.application(app, open: url, options: options)
         }
        .....
    }

Relace XXXXXXXXX with your facebook ID

RathaIct commented 3 years ago

Edit AppDelegate.swift


import FBSDKCoreKit

override func application(_ application: UIApplication, open url: URL,
                                    options: [UIApplication.OpenURLOptionsKey : Any]) -> Bool {
            if url.scheme == "fbXXXXXXXXXXXXXX" {
                return ApplicationDelegate.shared.application(application,open:url,options:options)
             }
          .....
}
darmawan01 commented 3 years ago

Is there any update for this issues on android/ios ?

riteshmj commented 2 years ago

Facing same issue. Is there any update on this?

abdulhannan123 commented 2 years ago

I am unable to use : final facebookSignIn = FacebookLogin(); facebookSignIn.loginBehavior = FacebookLoginBehavior.webOnly;

Help will be highly appreciated. Thanks!

image D665A399-BD30-45E0-B095-FADF9CEBF868

tiagoon commented 2 years ago

Esta resposta resolveu meu problema por aqui: https://stackoverflow.com/a/54685070/13649080

Download your APK to your PC in java jdk\bin folder

in my case C:\Program Files\Java\jdk1.7.0_121\bin

Go to java jdk\bin folder and run cmd then copy the following command in your cmd

keytool -list -printcert -jarfile yourapkname.apk Copy the SHA1 value to your clipboard like this CD:A1:EA:A3:5C:5C:68:FB:FA:0A:6B:E5:5A:72:64:DD:26:8D:44:84 and open http://tomeko.net/online_tools/hex_to_base64.php to convert your SHA1 value to base64. This is what Facebook requires get the generated hash ****= and copy the key hash to the facebook app.

colorwu76 commented 2 years ago

i got the same issue,try many times. finally i generate a release-apk , add the release-apk's key hashes to the facebook app, then it work may be its relate to security or something ,idk