简体   繁体   中英

How to solve "Login Error: There is an error in logging you into this application. Please try again later." error on Facebook login

My Facebook app is in Development mode (not Live mode).

When I install the app on my phone via Android Studio (Debug mode) it works fine. I've logged in with both my personal account and a test user.

However when I submit my app for Facebook's App Review, the reviewer gets this message on their Android device:

在此处输入图片说明

I supplied the reviewer with a test user that I confirmed was working on my device.

I have both the correct debug and release hash keys on my Facebook App dashboard for Android.

I sent/uploaded my app to Facebook in various ways:

  • Signed release APK
  • Signed debug APK
  • Non-signed debug APK

Yet each reviewer gets the same error message:

Login Error: There is an error in logging you into this application. Please try again later.

How is this possible?

Code:

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    auth = FirebaseAuth.getInstance()
    custom_fb_btn.setOnClickListener(this)
    login_button.setPermissions("user_birthday", "user_gender", "public_profile")
    val accessToken = AccessToken.getCurrentAccessToken()
    val loggedIn: Boolean = accessToken != null && !accessToken.isExpired
    if (loggedIn) return firebaseAuthFacebookSignIn(accessToken) else login_button.registerCallback(callbackManager, this)
}


override fun onClick(v: View) {
    when (v.id) {
        R.id.custom_fb_btn -> {
            // When custom Facebook button is clicked, imitate LoginButton being clicked
            login_button.performClick()
        }
    }
}

Facebook is using some rooted phones to test your app, so the app key hash from them is gonna be different to the ones that we had configured on the "Key Hashes" section on our app page.

Be sure to be using the same key hashes as Facebook or to delete the security all together.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM