I want to add log in with Facebook button to my application. So i tried to follow this guide.
Getting Started with the Facebook SDK for Android
I tried to get Android key hash. But i couldn't to run it on my PC cmd.
This is code i tried.
i added my home path to this %HOMEPATH%
.
keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | openssl sha1 -binary | openssl base64
But it shows like this error.
Can anyone help me to fix this error.
Firstly download openssl from this a link
Second extract it to Local disk C: name it openssl i.e folder name
third set it in Environment variables. procedure as follows
right click on My computer->properties->advanced->environment variables under system variables->click on path and click edit
Now insert a ';' semi-colon and paste the path of folder openssl. then ok.
now u can see openssl is recognized as command in cmd.
to get KeyHash execute follwing cmd
keytool -exportcert -alias androiddebugkey -keystore "path of ur debug.keystore" | "C:\openssl\bin\openssl.exe" sha1 -binary | "C:\openssl\bin\openssl.exe" base64
Solution for the warning---
WARNING: can't open config file: C:/OpenSSL/openssl.cnf
WARNING: can't open config file: C:/OpenSSL/openssl.cnf
openssl:Error: 'base' is an invalid command.
1st add below line in environment variable as similar to third step.
set OPENSSL_CONF=c:\openssl\bin\openssl.cfg
now run above cmd
keytool -exportcert -alias androiddebugkey -keystore "path of ur debug.keystore" | "C:\openssl\bin\openssl.exe" sha1 -binary | "C:\openssl\bin\openssl.exe" base64
u do get warning but keyHash is returned in cmd...
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments