问题
The Google and Facebook logins are working fine in Android Studio Tools, but they're not working on test version or beta testing, so please give me any clue to solve this problem.
回答1:
I had fixed this issue after contacting google support.
Below is the fix for this issue. Please follow the steps.
- To fix google login - Whenever you will create a debug or release apk, please make sure to update Package name and SHA1 fingerprint in your API key at "https://console.cloud.google.com/apis/credentials?project=???".
Please note SHA1 fingerprint will differ for debug and release build, so place it accordingly in google console.
- To fix facebook login - Whenever you will create a debug or release apk, please go to https://developers.facebook.com/ and choose your app and go to Settings --> Basic and add your Key Hashes for debug and release.
Hopefully this will fix your issue but if its not then please go to step 3.
Now you have to check for your app enrolled in Google Play App Signing or not. To check this please go to Google Play Console and choose your app that is published in beta and navigate to Release Management --> App Signing. There you will find the text at top "Google Play App Signing is enabled for this app". If so then copy the SHA1 certificate fingerprint from "App signing certificate" and add this SHA1 key as mentioned in 1st step. Now test after 5 or 10 minutes, your Google login will start work in the beta app.
Now you have to add the Key Hash of SHA1 (which we got from step 3) to Facebook console as like mentioned in step 2. Don't worry how to change this SHA1 to that Key Hash format. You can easily get it, please connect your beta version app in Android Studio and try to login in Facebook from your app and check Logcat from Android Studio, there you will find that Key Hash for this SHA1. To add it please follow step 2. Now your Facebook login also will start to work.
Useful link which is related to above fix - https://support.google.com/googleplay/android-developer/answer/7384423
回答2:
You must generate a keyhash for live sever and update to Facebook. You would have only used development keyhash.
来源:https://stackoverflow.com/questions/42020972/facebook-and-google-login-is-not-working-on-beta-testing-apk