0
我已经启用Facebook作为Firebase控制台中的提供者之一,并已双重检查Facebook app_id和应用程序秘密在Firebase和Facebook中是否匹配。此外,firebase Oauth重定向URI是我的Facebook应用程序设置中唯一有效的oauth重定向URI。Facebook登录错误在Android上使用Firebase:失败debug_token回复
在运行Facebook登录流程时,我多次验证登录流程是否成功,并且我正在从Facebook获取Oauth令牌。然而,它是mAuth.signInWithCredential(credential)
代码,其Task<AuthResult>
对象失败,出现以下异常
10-28 18:01:02.471 3883-3883/com.my.android.app D/ray232: signInWithCredential:failure
com.google.firebase.FirebaseException: An internal error has occurred. [ Unsuccessful debug_token response from Facebook:{"error" ]
at com.google.android.gms.internal.zzdlj.zzak(Unknown Source)
at com.google.android.gms.internal.zzdkl.zza(Unknown Source)
at com.google.android.gms.internal.zzdlu.zzal(Unknown Source)
at com.google.android.gms.internal.zzdlw.onFailure(Unknown Source)
at com.google.android.gms.internal.zzdll.onTransact(Unknown Source)
at android.os.Binder.execTransact(Binder.java:446)
这是代码片段抛出异常:
mAuth.signInWithCredential(credential).addOnCompleteListener(launchActivity, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
Log.d("ray232", "signInWithCredential:success");
launchActivity.onLoginRequired(false);
} else {
Log.d("ray232", "signInWithCredential:failure", task.getException());
Toast.makeText(launchActivity, "Authentication failed.",
Toast.LENGTH_SHORT).show();
launchActivity.onLoginRequired(true);
}
}
});
上有因此,对于这个问题Unsuccessful debug token response一个相同的问题,但我已经尝试了答案中的所有建议,但无济于事。
我使用以下版本:
com.firebaseui:firebase-ui-auth:3.1.0
com.google.android.gms:play-services:11.4.2
com.google.firebase:firebase-auth:11.4.2
com.google.firebase:firebase-core:11.4.2
com.facebook.android:facebook-login:4.27.0
为什么要工作? –