Question

Thanks to all in advance,

I followed this documentation:

and this specific video for facebook integration in Android:

But Unity does not fill (as in the video) "Debug Android Key Hash" field, that i should insert in my facebook app.

A screenshot of the problem

I've installed:

  • Unity 4.2
  • jdk1.7.0_25 (with environment variable Path)
  • all android sdk versions
  • openssl (in C:\openssl)

I tried to create manually the "debug.keystore" file using cmd.exe (Facebook Android Generate Key Hash) with keytool and moved it into "C:\Users\(My UserName)\.android", but Unity does not find that key hash.

Can anyone help me? i'm stuck...

-------------- SOLVED ------------------------

I used this solution Facebook Android Generate Key Hash to create a debug.keystore, moved to "C:\Users\(My UserName)\.android" and used this key on facebook

Was it helpful?

Solution

The script in the Unity Editor will try to run:

keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | openssl sha1 -binary | openssl base64

(or the mac equivalent if you are on a mac)

see: https://developers.facebook.com/docs/android/getting-started/facebook-sdk-for-android/

from your command it looks like you should have the key in:

"C:\Users\(My UserName)\.android"

and not

"C:\Users(My UserName).android"

(notice the folders)

or if you have multiple hard drives and don't have your home on your primary drive, then move debug.android to where ever your home variable path points to.

another thing would be to ensure that both keytool and openssl is in your path. you can manually execute them in the shell. If it can't find them then add them to your PATH.

I hope that helps.

OTHER TIPS

like this

like this but instead of eventappkey.keystore and the path put the path of debug.keystore then the SHA1 at the bottom is what you use for facebook, and remember to change it when you sign with release keystore

You can try creating an empty project in Android Studio (you can delete it later). Doing this generates the required debug.keystore file in "C:\Users\{username}\.android" directory.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top