Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by DaMex · Sep 26, 2013 at 09:09 AM · facebookunity-android

Unity Facebook SDK - Android Deployement - Key Hash ?

Hi everyone, hope I m not in the wrong spot of the forum for this thread ! Any ways, I got an issue to set up the latest version of the Unity Facebook SDK released, the 4.2.1 (build version 130912.80d74183e6e5bd9)

The problem that I m blocked at the app config step, following the documentation on facebook developer pages, it says that the SDK should be printing up the Key Hash for my app so I just have to copy / paste it the the facebook app config edition. But actually the Facebook Settings tool in Unity doesn't show up any key hash (nothing appears in front of Debug Android Key Hash), the app name and app ID are there, as much as the package and class name !

I have a feeling that I m missing something stupid out there but after 3 hours trying to find any hint somewhere, ... I m just stuck.

Any help please ?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Fattie · May 05, 2014 at 04:08 PM 0
Share

The only real solution:

http://answers.unity3d.com/questions/609810/using-facebook-api-with-android-says-login-is-canc.html

fortunately very simple. the only solution if you're on $$anonymous$$ac.

8 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by Caieu · Oct 03, 2013 at 02:37 AM

I had the same problem and did the following:

I downloaded the Openssl here, extract the archive, put the content of bin folder in C:\Program Files\Java\jdk1.7.0_06\bin (or your Java SDK Folder) and execute the following command in cmd:

 keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | C:\Program Files\Java\jdk1.7.0_06\bin\openssl.exe sha1 -binary | C:\Program Files\Java\jdk1.7.0_06\bin\openssl.exe base64


You need to enter password, is android.

After that, i reopenned the Facebook Editor settings and the Debug Hash Key appears.

Comment
Add comment · Show 11 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DaMex · Oct 04, 2013 at 12:17 PM 1
Share

Thank you for your answer that was very helpful and it did actually resolve my problem :) but I have to fix something you are missing out there, the " " in the paths :)

keytool -exportcert -alias androiddebugkey -keystore %HO$$anonymous$$EPATH%\.android\\debug.keystore | "C:\\Program Files\\Java\\jdk1.7.0_06\\bin\\openssl.exe" sha1 -binary | "C:\\Program Files\\Java\\jdk1.7.0_06\\bin\\openssl.exe" base64

Of course please think about replacing : **C:\\Program Files\\Java\\jdk1.7.0_06\** with you local JD$$anonymous$$ installation folder path

Important To know also, the right version of openssl tu use on windows 7 x64 with JD$$anonymous$$ version jdk1.7.0_40 is the version 0.9.8h-1 that you can download in zip format right here

avatar image lokindia DaMex · Nov 13, 2013 at 04:06 PM 0
Share

It works like charm! Wohooo! Thanks alot Da$$anonymous$$ex & Caieu :)

avatar image jason chou · Oct 07, 2013 at 11:14 AM 0
Share

hello, I used the same way to create Hash key, but Debug Hash $$anonymous$$ey didn't appear in Facebook Editor settings. Can you help me? thanks.

avatar image DaMex · Oct 07, 2013 at 11:15 AM 0
Share

you should maybe read the next post :)

avatar image Ankit Priyarup · Nov 02, 2013 at 11:47 AM 0
Share

Work's fine thanks bro xD

avatar image gajdot · Nov 14, 2013 at 01:40 PM 0
Share

I tried it, but still nothing... it finishes and all, but it just won't appear.

Show more comments
avatar image
2

Answer by Ziamark · Feb 16, 2014 at 05:10 AM

If anyone is wondering how to add the "system variables" on a windows 7 system.

Computer > System Properties > Advanced System Settings > (you should be on the advanced tab of the system properties window now) Environment Variables:

From here double click the "Path" variable in the system variables list and add your paths to the end of the "variable values" separated with a semi-colon like so:

 ... ;C:\OpenSSL\bin;C:\Program Files\Java\jdk1.7.0_51\bin

Hope it helps

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Almith · Feb 26, 2014 at 09:44 PM 0
Share

Oh, goodness. After googling for an answer for almost 2 hours now, your comment saved the day. Everyone else has left this vital information out. I was adding a new "Environment Variable" as opposed to adding to an the "Path" variable. Thank you so much.

avatar image Munchy2007 · Apr 04, 2014 at 09:27 PM 0
Share

Thanks so much, this info about adding the environment variables was the missing piece of the puzzle for me.

avatar image
1

Answer by ammoro · Feb 05, 2014 at 03:11 PM

Actually, the following solution is too much easier than all the other ones:

Just download OpenSSL, extract its content to (e.g. C:\OpenSSL) (for 64 bit machine, ownload openssl-0.9.8e X64)

Add both the bin directories of OpenSSL and Java JDK to the system variables and Unity/FacebookSDK will do all the work for you and you will get the Android key Hash!!

Simple, no? :-)

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Ziamark · Feb 16, 2014 at 05:12 AM 0
Share

Thank ammoro, that was easy. The bin is the key word here I missed.

avatar image vfxjex · Jul 06, 2014 at 12:09 PM 0
Share

what do you mean by system variables?

avatar image
1

Answer by PerfectlyInsane · Apr 20, 2014 at 05:11 AM

This took me 3 hours to work out, even after reading heaps of post of how to get it to work. First of all download openSSL at the time of writing you should be getting v1.01g or higher. Extract the files and move the contents of the bin folder to the bin folder of your java installation.

Set up the environmental of Path to

"C:\\Windows\\System32;E:\\Program Files\\Java\\jdk1.7.0_45\\bin" (Make sure there are no extra spaces)

You need to put system32 into the Path as you have choosen to place files there during OpenSSL installation.

Now go to command prompt to see if the paths have been done correctly the following should work/still work.

type "Keytool" then type "OpenSSL"

Now exit command prompt

If you have executed an android eclipse project you should now have a dubug key file located @ C:\\Users\[UserName]\.android called "debug.keystore"

Also make sure that unity project is in the same folder as the debug keystore or make changes to the facebook api as mentioned by other post. You might be able to create a fake folder to hold the debug keystore file, if you are unable to move to project to the keystore location.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image slake_it · Dec 01, 2015 at 05:47 PM 0
Share

Thanks, that helped alot, if anyone want the final command it would be keytool -exportcert -alias androiddebugkey -keystore "c:users\your user name.android\debug.keystore" | openssl sha1 -binary | openssl base64

  • the double " " around the path is important if you have spaces in of the file names (if your user name is "user 1" for example)

avatar image
0

Answer by SATISHKUMAR-GHINAIYA · Nov 29, 2014 at 09:08 AM

I have same problem.after spending 2 days i got this solution.

If you using facebook unity plugin than go to"Assets->Facebook->Editor->android" and open FacebookAndroidUtil.cs.

In above script just replace line number 70 with below line "var arguments = @"""keytool -storepass {0} -keypass {1} -exportcert -alias {2} -keystore {3} | openssl md5 -binary | openssl base64""";"

this is work fine for me.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

37 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Debug Android Hash Key - Facebook SDK 5 Answers

Touch: works on Unity-Remote, doesn't work on Android device after building 2 Answers

KeyNotFoundException: The given key was not present in the dictionary. 1 Answer

How to extend Activity (Android)? 1 Answer

Permissions not being granted with Facebook App installed 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges