I can’t figure out how to get the Key Hash required to use the Facebook Android SDK. I figured out that I can use keytool
with these commands:
- Android Facebook Error
- Generate Key Hash Android Facebook Windows 10 Update
- Generate Hash Online
- Generate Key Hash Android Facebook Windows 10 App Download
- Generate Key Hash Android Facebook Windows 10 Free
The only problem is that I have no idea where to insert this, I tried through command windows (win7) and I tried opening the file keytool.exe.
Therefore, you want to make sure you create a Release Key Hash and add this to the Android settings for Facebook App ID. To generate a hash of your release key, run the following command on Mac or Windows substituting your release key alias and the path to your keystore. On Mac OS, run. Facebook uses the key hash to authenticate interactions between your app and the Facebook app. If you run apps that use Facebook Login, you need to add your Android development key hash to your Facebook developer profile. For the version of your app that you release to you also need to generate and set a Release Key Hash.
Android Facebook Error
- Download and install OpenSSL from http://slproweb.com/products/Win32OpenSSL.html based on windows 32 or 64 bit.(Note: Download and install first visual C++ 208 redisributable from that site also )
- Put the bin directory of installed OpenSSL in windows path.
- Open the command prompt and go to C:Users{User_Name}.android
- now put this command on cmd “keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64“.(refer https://developers.facebook.com/docs/android/getting-started#samples)
- Now enter password “facebook” without double quote.
- Now a hash key will be generated
- Finally go to the Facebook Developer site. Make sure you are logged into Facebook and, using the dropdown menu in the top-right, go to your ‘Developer Settings’:
- Once you’re in your developer settings, select ‘Sample App’ from the navigation on the left, and add and save your key hash into your profile:
You can install Open SSL from here , that should make your command work
I created a batch script facebookkeydebug.bat, which return desired Facebook key hash. Just edit the script, set correct paths, keystore name and run it.
EDIT: I published a repo with some batch scripts for signing and getting cert keys on Windows: https://github.com/petrnohejl/Android-Scripts
you can use code below to get the Hash key :
Reference :
To make things easier –
this should provide you with the fingerprints needed, without the hassle of installing openssl.
e.g.
Generate Key Hash Android Facebook Windows 10 Update
This is an example of how to get the Key Hash from the Keystore:
first we need to get the paths of:
Generate Hash Online
Java path:
C:Program FilesJavajdk1.6.0_35jrebin
Open SSL Path:
C:OpenSSL-Win32bin
(install from: http://www.openssl.org/)
Keystore Path:
C:DataANDROIDKEYSTORE
2) then go to Command line and type:
Generate Key Hash Android Facebook Windows 10 App Download
cd [Java path]
3) then type :
keytool.exe -exportcert -alias [alias name] -keystore [Keystore
Path]debug.keystore | [Open SSL Path]openssl sha1 -binary | [Open
SSL Path]binopenssl base64
4) the password of your Keystore must be required and then you have the Hash Key
related to your Android Keystore.
This is the doc of how to set the Key Hash
for Facebook
:
You have to open a command prompt window. Go to start->run and type ‘cmd’ and hit enter. Then you have to navigate to the folder where keytool
is (unless it’s in your path), and then type that command.
That is, assuming that command is for windows and not linux.
Generate Key Hash Android Facebook Windows 10 Free
Best way is to generate Key-Hash using code:
call this method once and generate key-hash, enjoy
C:Program FilesJavajdk1.6.0_22binkeytool.exe -exportcert -alias “typeYouraliasname” -keystore locationof your keystore | C:OpenSSL-Win32binopenssl sha1 -binary | C:OpenSSL-Win32binopenssl base64
Tags: android, facebook, hash