SHA1 Hash same as Facebook Hash? (prime31 social plugin)

hello!

i want to integrate facebook in my app, so i created a facebook app on facebook and installed the prime31 social plugin for android.

i added the package name (my app’s package name) and the class name (as descriped by prime31) on the facebook developer site at my app.
facebook also asks for a hash key.

my question now is: is the hash key the same i need to add in google developer console when linking an app for in app billing? (the hash key i got from my .keystore file)
because i already have this key and used it to link my app for in app purchases. the key looks like “20:C0:F5:F4…”

but concerning facebook - i read some ppl wrote you have to get your hash key from the .keystore file by using keytool and some long command looking like

“keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64”

do i need to do this for FACEBOOK as this hash key is different from the one i used for google developer console?
sorry i am not into all this yet and i am a bit confused…
and when i start the testscene of prime31’s social plugin nothing works and i only get a “valid session? false” in the debug log

Here is a great post on how to get the proper hash for facebook. It links the proper ssl to get the correct hash (new ssl versions do not create the hash you need. Also, someone in the post made a GUI for getting the hash, I have not tried it. EDIT: The link I posted is more relevant to windows, put the process is the same on a mac.

EDIT 2:

Openssl for mac with a little info:

http://www.itechtalk.com/thread7108.html

The method for getting the hash is what you noted.

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

That is obviously for the debug key, you replace the debug with your relevant info. NOTE: you will get a hash even if the you mistype the password, etc. Of course, this hash will not work, but it will still give you one. Real pain in the butt.

Also note, sometimes facebook will replace certain characters in the hash.
Here is an example of a hash that facebook wants.

NteSLOyHHHx1-WUnrW0NEbwcY2Y=

The hash you create might look like this:

NteSLOyHHHx1+WUnrW0NEbwcY2Y=

Notice the ‘+’ and ‘-’ are switched.

this will help you to solve your problem