[英]Android Facebook login works in debug, doesn't work in published app
I have an Android app that has Facebook login. 我有一个Android登录的Android应用程序。 I've tested number of times on my device (it has Facebook app installed, if it helps) and login works flawlessly. 我已经在我的设备上测试过多次(它安装了Facebook应用程序,如果它有帮助)并且登录工作完美无瑕。 I've submitted my app to Play Store, and users can't login with Facebook in release version. 我已将我的应用程序提交到Play商店,用户无法在发布版本中使用Facebook登录。 I've noticed that even I have Facebook app installed, there is a web browser window with something like Facebook login page displayed split second, it disappears, and my activity indicator (which should stop and go to next activity upon login) spins forever. 我注意到,即使我安装了Facebook应用程序,也有一个Web浏览器窗口,其中显示Facebook登录页面分秒显示,它会消失,我的活动指示器(应该在登录时停止并转到下一个活动)永远旋转。
I am using Parse 1.9.1 and ParseFacebookUtilsV4-1.9.1 and I login using ParseFacebookUtils using: 我正在使用Parse 1.9.1和ParseFacebookUtilsV4-1.9.1并使用ParseFacebookUtils登录:
ParseFacebookUtils.logInWithReadPermissionsInBackground
The same user, the same user, everything is the same. 同一个用户,同一个用户,一切都是一样的。 In debug mode, it just logs in, but in release it doesn't, and I don't know why and I can't debug. 在调试模式下,它只是登录,但在发布时它没有,我不知道为什么,我无法调试。 What are the possible causes and how can I debug this? 可能的原因是什么?如何调试?
Check the Key Hash
settings on https://developers.facebook.com for your app. 检查https://developers.facebook.com上的Key Hash
设置,了解您的应用。 You need to have both key hashes for release and debug version set in app developer console. 您需要在app developer Console中设置两个用于发布和调试版本的密钥哈希值。 It might be that you've just set the key hash for the debug environment. 您可能只是为调试环境设置了密钥哈希。 For more see Setting a Release Key Hash . 有关更多信息,请参阅设置释放键哈希 。 Hope it helps. 希望能帮助到你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.