FirebaseUI Auth - Facebook Login error : Unsuccessful debug_token response from Facebook

*爱你&永不变心* 提交于 2019-12-22 04:11:41

问题


I'm trying to integrate FirebaseUI Auth library. Google sign-in and Email sign-in are working fine but I have a problem setting up Facebook Login. This is my code:

user = firebaseAuth.getCurrentUser();
            if (user != null) {
                   startMainActivity();
                   finish();
            } else {
                startActivityForResult(
                        AuthUI.getInstance()
                                .createSignInIntentBuilder()
                                .setIsSmartLockEnabled(!BuildConfig.DEBUG)
                                .setProviders(Arrays.asList(new AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(),
                                        new AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build(),
                                        new AuthUI.IdpConfig.Builder(AuthUI.FACEBOOK_PROVIDER).build()))
                                .build(),
                        RC_SIGN_IN);
            }

When I click the facebook button all the login process goes well (in my facebook profile I see the app in my apps list) but firebase doesn't create the user and I'm stuck on the login page. In Android Monitor I have the following lines (the app doesn't crash):

E/CredentialSignInHandler: Unexpected exception when signing in with credential
                           com.google.firebase.FirebaseException: An internal error has occurred. [ Unsuccessful debug_token response from Facebook ]
                           at com.google.android.gms.internal.zzblv.zzce(Unknown Source)
                           at com.google.android.gms.internal.zzbls$zzj.zza(Unknown Source)
                           at com.google.android.gms.internal.zzbmd.zzcf(Unknown Source)
                           at com.google.android.gms.internal.zzbmd$zza.onFailure(Unknown Source)
                           at com.google.android.gms.internal.zzbly$zza.onTransact(Unknown Source)
                           at android.os.Binder.execTransact(Binder.java:453)

The error that Firebase shows up is only "Unsuccessful debug_token response from Facebook" without any code or error message... I don't know what to do.

Thanks for the help!


回答1:


I have the same problem, the facebook auth on firebase was enabled but pointing to another application id that is different with one I am working on.

So need to make sure the application id from "firebase console/ authentication/ sign in method/ facebook" is the same with application id on your facebook console.

I took me several hours to figure out, hope it useful.




回答2:


Go to Facebook developers page and select your app from the dropdown menu. Then go to Settings -> Advanced and find Is App Secret embedded in the client? select No from the toggle button and done. Refer this image link if you face any difficulty finding the option. Facebook Login error : Unsuccessful debug_token response from Facebook




回答3:


I had the same problem and resolved it after re-checking the App Secret on the top right of the screen at Facebook developers page. Make sure the App Secret in Firebase Authentication(Facebook Provider) is the same as the app secret in Facebook developers page.

App secret on Facebook developers




回答4:


You need to check the both: App secret and App ID from the Facebook developers page and Firebase Authentication (Facebook Provider), because Firebase by default has his own ids




回答5:


I had the same problem and couldn't figure it out for hours. It is most likely a wrong App-ID within your firebase auth configuration (facebook). In my case, I had entered the bundle name of my app instead of the App-ID of facebook. Hope it helps.

app configuration within firebase console




回答6:


For me, resetting the App Secret did the trick. Go to Settings --> Basic and then click 'Reset' beside your 'App Secret'




回答7:


I didn't have the switch toggled saying "Yes" to "Is this a native or desktop app". I then re-entered the app secret in Firebase and made sure to add the OAuth Redirect URI to the Facebook app.




回答8:


make sure this is correct with facebook dev page



来源:https://stackoverflow.com/questions/43357232/firebaseui-auth-facebook-login-error-unsuccessful-debug-token-response-from

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!