0

Ionic login is working locally and at haz.heroku.com

However, when i run $ ionic run android and test app in android mobile, facebook login is not working. You can check my codes [here](https://github.com/asimkh/apps/tree/haz

facebook app details

For Android, facebook setting are updated as below. Once app is installed and click on Facebook login button, no error, message, nor login message prompts.

enter image description here

check this error details.

Adam Azad
  • 10,675
  • 5
  • 25
  • 63
Asim Khan
  • 185
  • 2
  • 3
  • 11

2 Answers2

1

On Android, there is no localhost anymore. You have to add the Android platform instead.

luschn
  • 68,448
  • 8
  • 104
  • 118
1

You need to add you Google Play package name and create hash keys and add them to your Facebook application.

  1. Download openssl from the link bellow: https://code.google.com/p/openssl-for-windows/downloads/list
  2. Unzip it to a local drive (e.g., C:\openssl)
  3. To get the Development key for facebook integration, use the following command from the command line in windows:

keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%.android\debug.keystore | "C:\openssl\bin\openssl.exe" sha1 -binary | "C:\openssl\bin\openssl.exe" base64

NOTE!: please replace the path for openssl.exe (in this example it is "C:\openssl\bin\openssl.exe") with your own installation path.

It will prompt for password, e.g., Enter keystore password: android Type android as password as shown above.

Thats it! You will be given a 28 character long key.

Use the same procedure to get the Release key. Just replace the command with the following and use your release key alias.

keytool -exportcert -alias YOUR_RELEASE_KEY_ALIAS -keystore YOUR_RELEASE_KEY_PATH | "PATH FOR openssl.exe" sha1 -binary | openssl base64

Credit to: https://stackoverflow.com/a/32211444/4440845

The package name can be found in the config.xml file in your project. For more information check out this tutorial : http://excellencenodejsblog.com/cordova-ionic-facebook-login-mobile-app/

Community
  • 1
  • 1
Vandervidi
  • 572
  • 2
  • 13
  • 28