Facebook SDK keeps asking permissions [Android]

The problem is that when the app is requesting permissions
you get this popup but if you click ok nothing happens and this popup keeps coming up as if it does not get user permission.

Facebook Android Login Popup

If i sign the app as a debug user through these settings it DOES WORK

alt text

But obviously for the final build i have to sign the app with my normal alias.
What could the problem be?

I also found out that the debug hashkey keeps changing when i change between keystores and it could be an openssl problem. I get a different key from Mac to Win and a different key if i get it from the Facebook settings or the -keytool command. Is there a way to know the actualy hashkey ?

alt text

To find the key hash for your signed apk you need to do the following in a command prompt:

keytool.exe -exportcert -alias youralias -keystore path | C:\OpenSSL\bin\openssl sha1 -binary | C:\OpenSSL\bin\openssl base64

Just replace youralias with the alias of your keystore, path with the directory your keystore is located eg. F:\My Documents\user.keystore and replace the OpenSSL paths with your own.

Type in the keystore’s password and hit enter. It should then give you the key hash that you put in the Facebook developer settings. You should now be able to login to Facebook in your app.