Generate Android Key hash for Facebook App and LinkedIn App

/ / 0 Comments
Today I am going to start my first post on  Codepedia.info.[ads]Overview: This article explains how to generate `Android key hash` for FACEBOOK App and LINKEDIN App as in Login Authentication i.e. Facebook SDK integration to android require an key hash configuration same for LinkedIn App.

Android key hash facebook

So  Are you working on Social Login ? From Android to LinkedIn App or Android to Facebook App? Whichever it may be you will need an android hash key facebook and package name to login using social elements. I hope you all are familiar with android studio or eclipse and required java and SDK required to run an android application. Let us start with the steps
  • Go to your `keytools` directory using command prompt.
Now what is keytools and where will you get it in your system.

What is Java Keytool ?

Java Keytool is a key and certificate management utility. It allows users to manage their own public/private key pairs and certificates. It also allows users to cache certificates. Java Keytool stores the keys and certificates in what is called a Keystore. By default, the Java Keystore is implemented as a file. It protects private keys with a password. A Keytool Keystore contains the private key and any certificates necessary to complete a chain of trust and establish the trustworthiness of the primary certificate. [ads_468_60]

Where will you get or what is its directory?-

Generally Java folder is in C:/Program Files/  then move inside that folder to jre6 or jre7. and then move to bin folder. To make things more clear i will post a image/screenshot of it. Android hash key facebook
  • Go to this directory and then enter the following command
//*
keytool -exportcert -alias androiddebugkey -keystore "C:UsersUser.androiddebug.keystore" | openssl sha1 -binary | openssl base64
//*
Now after you enter the above code you may get the following error
openssl is not recognized as an internal or external command
Below screenshot will make things more clear Android hash key facebook   Now this error may be because of two things
  1. OPENSSL path may be different.
  2. OPENSSL may not have been installed in your system.
For first error the solution is to change the path of OpenSSL for eg C:Usersabcopensslinopenssl.exe and for second error the solution is you can download the To download OPENSSL OpenSSL for 32bits OpenSSL for 64bits After you have downloaded the zip file. Just extract the file to you required path. Preferably (program files) for eg. C:Program Filesopenssl
  •  After this, you need to tweak the previous command in the command prompt a bit.
//*
keytool -exportcert -alias androiddebugkey -keystore "C:UsersUser.androiddebug.keystore" | "C:Program Filesopensslinopenssl" sha1 -binary | "C:Program Filesopensslinopenssl" base64
//*
Android hash key facebook If you have saved the `OpenSSL` folder in example path
  • Then you will be asked for password
Android hash key facebook Enter android as password then you will get the hash key. And then use the hash key wherever you need.   Hope you enjoyed this tutorial. If you have any recommendations, please let us know what you think in the comment section below! See you again next time!
If You Liked It, could you do me a favour and tell your friends !! By sharing it on Facebook, Google+, Twitter.
[txt_ads]    

Thank you for reading, pls keep visiting this blog and share this in your network. Also, I would love to hear your opinions down in the comments.

PS: If you found this content valuable and want to thank me? 👳 Buy Me a Coffee

Subscribe to our newsletter

Get the latest and greatest from Codepedia delivered straight to your inbox.


Post Comment

Your email address will not be published. Required fields are marked *

0 Comments