[SOLVED] Facebook working until signed version then hash doesn't match :(

I’m working on a new game (same as everyone else), I’ve integrated Facebook following their guidlines, my app when I build it and send it to my phone works fine, I exported a signed version to upload to google play and put the same version on my phone, now I can’t log in on the phone as I get a facebook ‘invalid hash key’ does not match stored hashes’ error message.

Is this just because its a signed version put on my phone and everything is actually fine or is this because I did something wrong signing the package or something else?

Thanks in advance :slight_smile:

Diego

[SOLVED UPDATE]
I needed to generate a key in unity and save it tutorial here :

Then use terminal on my mac and run the following command :
keytool -exportcert -alias -keystore | openssl sha1 -binary | openssl base64

Swapping my release key alias and path for the name of the user in the keystore and the path to the file where I stored my keychain

If you get a syntax | error, don’t use <> brackets when entering the username and path to the file.

I then copied the hash from terminal and pasted it into the facebook dev console.

Then finally I ran my app go the same error but a different hash, I copied that off my phone and pasted that into facebook dev console (so there are now 3, the debug one from fb sdk in unity, the generated one by terminal and the one from my phone). Done. for now…

Onwards and upwards to the next hurdle…

How did you created your hash?
Did you use the hash from the Facebook Settings in the Editor or you created your own hash from command prompt?
I had the same problem but, I have created my own hash from command prompt using this step by step tutorial to create hash (15 steps are given) -

http://stackoverflow.com/questions/5306009/facebook-android-generate-key-hash

Try this tutorial and use that hash and upload the build. Maybe this will solve your issue. It worked for me.

I used the editor in unity then copy and pasted it to the facebook app as per their guidelines. It works perfectly fine until I sign the exported apk file and then the same package transfers to my phone and boom, facebook shows a hash mismatch warning message.