简体   繁体   中英

facebook login issue with android sdk

I have created an app which needs to login with the facebook.

When i connect my device to my pc and run it from android studio then it is works fine.

i am able to connect with facebook sdk and able to login.

But when i create an .apk of my app and install it on my device and other devices then it is not able to login with that.

When i press login button then it goes to facebook page and return to my app screen.

i have done all settings on facebook developer account . my app is live and i have turn on single sign on

So what is the issue with that ? When i run it from studio then it works but when i create an apk and run then it is not working.!!!

When you run app from Android Studio it uses debug key hash to login in Facebook. Did you set Facebook release key hash like it show in their docs? https://developers.facebook.com/docs/android/getting-started#release-key-hash

Typically when you create an apk, you're using a different key to sign the app (whereas debug builds will use the debug key).

This means that you need to update the key hash in your Facebook app settings to also include the key hash of your release key.

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