Facebook Hash not picking up

Hello fellow developers,

I have been trying for about a hour to get the Facebook SDK to pick up by hash debug key , I have generated it follow all the guilds on stack overflow but unity still will not pick it up is there any think I need to do

I got unity3d 4.3
Facebook SDK 4.3.6

The app will build correctly with my keystore and key

Thank you for any help

I found out the issue , As I am running windows 8 64bit , the editor script looks at the %HOMEDRIVE% and on window 8 it need to looks at %HOMEDRIVE% as well to get the full path

I’m struggling on this for almost 2 days now and like you, I’ve tested all the things possible to get that debug.keystore bug fixed.

I didn’t understood how you fixed your issue.

I have Windows 7 64 bits, what should I do ?

Thanks for the reply =)

[EDIT] Just to precise a few things =)
I have my debug.keystore.
The issue is that Unity can’t find it !
It looks at the %HOMEPATH% (Which is C:\Users{Username}) and then .android\debug.keystore
I have everything at the right place. At least, I think !

Hi mate , If you open up the Facebook editor script called FacebookAndroidUtil on line 65 is where it looks for the path for the debug.keystore , I manually changed the file to point at a set path , and now it

Also make sure the alias for the keystore is androiddebugkey

I fixed it yesterday, after 3 days struggling on it, thanks to an answer I recieved on a youtube comment I posted.
Actually, I don’t exactly know WHY it has to be like that, but I’ll explain how I did it, and hopefully it will be helpfull for some people.

You need to have your Java and OpenSSL installed on he same Drive.
Then, add their “bin” folder location to your “path” Environment Variable.
Finally, your project MUST be on the same drive as the installed Java and OpenSSL (for me, I just moved it to My Documents … the default location for Unity Projects …)

And the issue was solved =)

DarkSprite, thanks for pointing out the solution. Just to elaborate a little bit.

Line 61 of Facebook/Editor/android/FacebookAndroidUtil.cs (Facebook SDK 4.3.6) returns the following path to debug keystore:

return (Application.platform == RuntimePlatform.WindowsEditor) ? 
                    System.Environment.GetEnvironmentVariable("HOMEPATH") + @"\.android\debug.keystore" : 
                    System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + @"/.android/debug.keystore";

The first option will be returned:

 System.Environment.GetEnvironmentVariable("HOMEPATH") + @"\.android\debug.keystore"

HOMEPATH environment variable returns the following:

\Users\MrFoo

Therefore, the following will be returned:

\Users\MrFoo.android\debug.keystore

This will be perfectly fine if your project/Unity installation (don’t know which one) is located on the same drive as your system, but if it’s anything else, this will fail. For example, my system (together with Users folder) is located on C:, Unity is installed on V:, and project located on W:.

Now, HOMEDRIVE environment variable contains the letter of your OS drive, so if you edit the code above and do the following, just as DarkSprite suggested, you’ll get a proper path to your debug keystore:

return (Application.platform == RuntimePlatform.WindowsEditor) ? 
                    System.Environment.GetEnvironmentVariable("HOMEDRIVE") +
                    System.Environment.GetEnvironmentVariable("HOMEPATH") + @"\.android\debug.keystore" : 
                    System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + @"/.android/debug.keystore";

This will return just what you need:

C:\Users\MrFoo.android\debug.keystore