私はFirebaseUI認証を使用しています。メールやGoogleアカウントでログインしても成功しましたが、のFacebookでログインできません。 AuthUIアクティビティが開始され、Facebookでサインインしようとした後にonActivityResult()
が呼び出されません。サインインしようとすると、アプリケーションは読み込み中のウィンドウで止まってしまいます。 logcatは、FirebaseAppログを出力します。FacebookとのFirebaseUI認証が機能しない
バックグラウンド状態をリスナーに通知します。私はfirebaseガイドが述べたように、と私はアプリを公開する設定として有効なOAuthのは、URIリダイレクト設定Facebookアプリのダッシュボード上で
(それは公共または開発状態にある場合、それは問題ではありません?)。 Firebaseコンソール私はFacebookのログインを有効にして、のアプリケーションIDとのアプリケーションの秘密を設定しました。
Thisはサインインした後に何が起こったのかを示す録画です。
onActivityResult()
はなぜ呼び出されませんか?
MainActivity:
/**
* Use this method to start the FirebaseUI sign in activity.
*/
public void switchToSignIn() {
this.activity.startActivityForResult(
AuthUI.getInstance()
.createSignInIntentBuilder()
.setProviders(
AuthUI.EMAIL_PROVIDER,
AuthUI.GOOGLE_PROVIDER,
AuthUI.FACEBOOK_PROVIDER)
.build(), RC_SIGN_IN);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == RC_SIGN_IN) {
if (resultCode == this.activity.RESULT_OK) {
// user is signed in!
Log.d(Constants.TAG_LoginHandler, "Sign in result: RESULT_OK");
logUserInfo();
tryAccessMainFragment();
} else {
Log.d(Constants.TAG_LoginHandler, "Sign in result: RESULT_CANCELLED");
// user is not signed in. Maybe just wait for the user to press
// "sign in" again, or show a message
}
}
}
はbuild.gradle:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.firebaseui:firebase-ui:0.4.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.hdodenhof:circleimageview:1.3.0'
}
apply plugin: 'com.google.gms.google-services'
動画を公開してください。プライベート – pRaNaY
今公開中です。ありがとう! –
これは表示されています。ありがとう – pRaNaY