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!
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