user875139
user875139

Reputation: 1621

Whats the proper keytool command to get facebook app signature on android?

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

Upvotes: 3

Views: 2099

Answers (1)

Sorab
Sorab

Reputation: 128

I got it to work on Windows 7 by doing the following:

  1. Copy the entire bin directory from the openssl install to the jdk.x.x\bin directory where the keytool is.

  2. 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
    
  3. It asks for a password (only once) which is android

Hope this works for you

Upvotes: 5

Related Questions