Android Question Facebook Authentication Key Hash

virpalacios

Member
Licensed User
Hi everyone, I am trying to test the Facebook Authentication Sample, I am in the Process of generating my Key Hash, I read a tutorial stating that I
have to use a debug.keystore, however for my development processs I generate my own private key and using it. I asume I have to use the private one (I compile all my app with it).
Please confirm if I am correct with it.

Link for the tutorial.
Generate Key Hash Tutorial

Thanks in Advance for your comments
 

virpalacios

Member
Licensed User
Hi Erel, Good Morning, thanks for your promptly answer, I will reread the link recommended, I will keep my results updated

Best Regards
 

virpalacios

Member
Licensed User
Hi good morning everyone, here news about generating facebook key hash, I hope it helps you

  • After download openssl from link I installed it at c:\openssl and include path c:\openssl\bin in PATH environment variable (Advanced Control Panel Settings)
  • I opened a command window and navigate to java directory in my case C:\Program Files (x86)\Java\jdk1.8.0_131\bin
  • In this directory is located the command keytool.exe (it is very important)
  • I have two keystore files (a debug key and a private key) , I decided to put them in a specific directory c:\ (just to save some typing)
    • I got debug.keystore file in my B4A folder in my case C:\Basic4android
    • I got a llave_privada.keystore in a folder when I generate it previosly (generated using B4A tools)
    • I put both keystores files in c:\key folder (Because I want to get a key hash for debug and a private, but you choose wich one is for you)
  • After everthing is ready we proceed to generate a debug key hash (you type it on command window already set in java bin directory )
    • keytool -exportcert -alias B4A -keystore c:/key/debug.keystore | openssl sha1 -binary | openssl base64
      this command ask for password you type android
      • You get your key hash: dAPXPiWVUgf2rtcLfUWvEyzxdyU=
  • Now I am generating a key hash for my private key (llave_privada.keystore is my private key file)
    • keytool -exportcert -alias B4A -keystore c:/key/llave_privada.keystore | openssl sha1 -binary | openssl base64
    • This command ask for a password, you have to put your password of you keystore
    • password: MiPanama777&
      You get your key hash: DCHcJHYl4Vu+iHdCUrBAEeEL9Po=

Hope it can help you

Best Regards

Virgilio from Panama
 
Last edited:

virpalacios

Member
Licensed User
Hi everyone, I got my Facebook authentication sample working today, congratulations Erel for your Superb Job with B4x tools, I have just a small issue with facebook id, this id has to be registered in your firebase screen for your app. But after it puttin it, everything got fine.

Best Regards
 
Top