I run the script below like Facebook said. There is no compiling problem. The problem is it never gives me a password question after process finished and according to facebook documentation it means my keystore path is incorrect. But debug.keystore file is in correct path! C:\Users\KSM45.android
Please let me know where do I make mistake? I just want to login with facebook!
(From documentation page: Also make sure you are using the correct password - for the debug keystore, use 'android' to generate the keyhash. General Rule: If the tool does not ask for password, your keystore path is incorrect.)
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
Try to delete your keystore in ~/.android/debug.keystore then clean your project in eclipse and run your app so the eclipse plugin re-create your keystore.
I tried it on WinXP at work today and it didn't work. After few trying I realized this
this is the line i ran and failed:
keytool -exportcert -alias androiddebugkey -keystore C:\Documents and Settings\Administrator.android\debug.keystore | openssl sha1 -binary | openssl base64
the thing is, you should put "quotation marks" around your debug.keystore path
just like this:
keytool -exportcert -alias androiddebugkey -keystore "C:\Documents and Settings\Administrator.android\debug.keystore" | openssl sha1 -binary | openssl base64
Related
I need to generate a Development Key Hash because I am getting this error on my Facebook Login implementation for Android app:
The official Facebook documentation at https://developers.facebook.com/ when I access it from my Facebook account, provides this information:
They provide the following code for Windows:
keytool -exportcert -alias androiddebugkey -keystore "C:\Users\USERNAME\.android\debug.keystore" | "PATH_TO_OPENSSL_LIBRARY\bin\openssl" sha1 -binary | "PATH_TO_OPENSSL_LIBRARY\bin\openssl" base64
I created the following empty folder on my computer: C:\Users\jmont\Documents\key:
I ran the following from the command line:
C:\Program Files\Java\jre1.8.0_341\bin>keytool -exportcert -alias androiddebugkey -keystore "C:\Users\jmont\Documents\key\debug.keystore" | "C:\Program Files\openssl-0.9.8k_WIN32\bin\openssl" sha1 -binary | "C:\Program Files\openssl-0.9.8k_WIN32\bin\openssl" base64
tR7PbbRhsiXgMNogn/cCg5DAl6A=
I was expecting to see a KEYSTORE File at C:\Users\jmont\Documents\key, but the folder remains empty. No error was thrown from my execution of the command shown above, and apparently the Key Hash tR7PbbRhsiXgMNogn/cCg5DAl6A= was successfully generated. Where did the debug.keystore file was exported to? Where can I find that KEYSTORE File? Thank you.
i am using appcelerator Studio 6.0.4GA SDK , i am having issue by finding debug.keystore
when i write in Terminal :
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
its return keyhash , i've put this keyhash in Facebook developer app but its still giving error key hash not matched , where i can get this keyhash, since i am using Mac and Appcelerator Studio .
There are 2 types of key-hashes developers need to put into FB app settings.
- Development Key Hash -
As mentioned in FB docs here, you need to run this command for all development builds,
keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64
androiddebugkey is the key_alias name
debug.keystore is the keystore file name which is stored in your mac user home-directory in a hidden folder .android
after running this command, it will ask for a password, put android, it's the default password for this default keystore.
- Production Key Hash -
Same command is used to get production key-hash but with your own keystore file, alias_name & password.
keytool -exportcert -alias <alias_name> -keystore <keystore_file_path> | openssl sha1 -binary | openssl base64
put alias_name as same as you used to create your production keystore.
put same password you used to generate your production keystore.
To save the work, you can simply use zON/CPoDnIgHvMure4hh9HWdR58= which represents the default dev-keystore for Titanium Android apps.
Here is the solution might help someone else
1- navigate to /Users/YOUR_USER_NAME/Library/Application Support/Titanium/mobilesdk/osx/<YOUR_SDK_VERSION>
2- type in terminal
keytool -exportcert -alias tidev -keystore dev_keystore | openssl sha1 -binary | openssl base64
3- put the password : tirocks
they keyhash will print out
well i am stuck on this step too
$ keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64 Enter keystore password: android
please any body explain it
after i tried on cmd i get it and it do as follow
first locate keytool in your system by cd \path\
after that write this line as it is
$ keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
and this one mean ~/.android/debug.keystore
the path where your keystore exported from eclips
and to make sure that the hashkey generated is really right the cmd should ask you about the password you use to generate keystore
I created facebook application and i put key in key hash
still facebook login failed
error is Invalid key error.
Plz help me.
my application is ready but this problem cause delay in publishing my application.
the steps that i followed to get key hash are
copied all file from OpenSSl into jdk
set path to C:/programfiles/java/jdk/bin in command prompt
then run= keytool -export -alias androiddebugkey -keystore "[PATH]\debug.keystore" -storepass android -keypass android | openssl sha1 -binary | openssl enc -a -e
got hash key +ZRWQIs5LsdDsBNdoJ8wT2RyYrE=
copied into native android app in hash key but still error occurred plz help me
Use the below command to generate your keyhash.
keytool -exportcert -alias androiddebugkey -keystore [your path]/.android/debug.keystore | openssl sha1 -binary | openssl base64
use "android" as a password.
For more information on facebook Single Sign-On you can check the link
I am trying to use openssl to export the key for my app. I followed the facebook developers guide but I am stuck when it comes to the keytool command.
Facebook has it this way:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
I have mine this way:
"C:\Program Files\Java\jdk1.6.0_23\bin\keytool" -exportcert -alias androiddebugkey -keystore "C:\Users\blah\.android\debug.keystore" | "C:\blah\bin\openssl" sha1 -binary |"C:\blah\bin\openssl" base64
I run openssl.exe as an administrator. When I run the above command, it says "Openssl Error: "C:\program files\java\jdk1.6.0_23\bin\keytool"" is an invalid command.
Please help! Thanks
I got it to work on Windows 7 by doing the following:
Copy the entire bin directory from the openssl install to the jdk.x.x\bin directory where the keytool is.
Run the command as shown in the facebook doc as follows:
keytool -exportcert -alias androiddebugkey -keystore C:\Users\MYUSER\.android\debug.keystore | openssl sha1 -binary | openssl base64
It asks for a password (only once) which is android
Hope this works for you