简体   繁体   中英

Unity Facebook SDK for Android. App keeps asking permissions

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.

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

在此处输入图片说明

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 actual hashkey?

You need to add all the hashkeys that you're gonna use when signing the app to the FacebookApp settings page. You can set up more than one and you'll need this if you're gonna sign the app with debug keys and release keys.

Debug keys may differ from machine to machine so it's better to just distribute the keystore with your Unity3D project and use the same one everywhere you build the project.

If you don't want to distribute the release keys you may want to consider setting up a build machine.

To get the hashes for a keystore you need to run:

keytool -exportcert -alias keyalias -keystore path_to_keystore | openssl sha1 -binary | openssl base64

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM