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
爲什麼要工作? –