-->

Tuesday, April 19, 2016

4 Simple, Fast and Easy Steps To Generate A Facebook Key Hash For Android App Integration On Windows

How to generate a key hash for android app integration
A Facebook key hash is more like a verification code required when creating a Facebook android application. The key hash helps the system to determine your development environment (The model and Operating system).

I wanted to create an App for my blog, and suddenly, I was asked to give my Facebook android app's ID and Secret. I was furious because I knew nothing about a facebook android app's ID or secret. I searched and took many tutorials to be able to start creating my Facebook Android App.

Quite interesting isn't it? Knowing that your app will be created in at least 10 minutes. I took all the Guidelines until I got to the Key Hash section. Guess what? I became stuck, I didn't know what to do.

So, I searched and read bunches of assumed tested and trusted tutorials (Bunch of scrap), But it was a total waste of time. Because, none of those sites I visited gave an accurate step-by-step tutorial to generate a Facebook android app key hash. Please be patient, read this article from the beginning to the end to get every single detailed required information.

But wait, before creating the application, you should be able to identify the main reason why you need the application. Many integrates it into their personal apps while others use it to gain more popularity on Facebook.

Getting Started In Creating Your Facebook Android App

Maybe you want to create a Facebook app and don't know how to go about it, so, read this little piece of information on how you can start creating your Facebook Android App.

Login To Your Facebook Developers Account.

Facebook developers

To start creating your app you have to login to your Facebook developers account. If, you have a Facebook account then you can authenticate it to your developers account. But if you don't have one then you can create one from the facebook link above.

Once you have successfully logged in to your facebook account, You will be redirected to the Developers Dashboard and there you can start creating your app.

If you want to start creating a new Facebook Android App or edit existing ones, Read on...

On your facebook developers dashboard account, Navigate to the menu and click on the 'My Apps' drop-down button. There you can choose whether to create a new app. Or if you want to edit an existing app, Click on the 'My Apps' button and click on the existing app to start editing.

When you click on the 'Add New App' option, a pop-up will display asking you to choose the platform which you wish to create an app for. Choose android which is represented by a white robot in a green background.

After doing this then, you can now proceed and start creating your app.


After you have chosen Android as your preferred option, Then something like the picture above here should be familiar to you. Complete all the necessary steps for creating your app. A fixed menu on top of the screen will be showing you your progress towards every section. (Please open images in a new tab to zoom).

But once you get to the Key Hashes' section then, you will have to figure out how to generate your key hash (If, you don't already have one or don't know how to get one).


Congratulations! If, you've made it to the Key Hashes' section. Get ready to take the below tutorials or steps seriously to find out how to generate your key hash. Though Facebook has a tutorial to generate the hash key, But many says it's not just working for them. I have managed to figure out this trick that will give what you are looking for faster than expected.

Looking forward for this?

Steps To Take In Generating Your Facebook Key Hash.

So, you don't know anything about generating a Facebook key hash right? Sit back and relax let me show you how you can do that in less than 10 minutes. So let me show you how.

1. Download OpenSSL For Windows

OpenSSL logo on Google Code

To start generating your Facebook key hash you must first of all download OpenSSL for windows (If you don't have one already). To download the OpenSSL file follow these steps:




    • Download 'Openssl-0.9.8k_WIN32.zip' (Recommended for generating a key hash) directly from here without visiting the Google Code page.
    • After your download has been completed, Click on it to open in the downloads folder. Just above the zip file click on 'Extract All Files', wait until windows have successfully extracted all files.
    • Click the right button and then rename your the folder from openssl-0.9.8k-WIN32.zip to OpenSSL.
    • After renaming your file to OpenSSL then, Move it to Local Disk (C:). After moving your file to Local Disk (C:), Click on this link to see how your OpenSSL will look life after moving it to Local Disk (C:) - The way your folder will look on Disk (C:) depends on your view. If you have done this then, let's move to the second step.
2. Run A Command On Windows.

windows command prompt

After successfully renaming and moving your file to Local Disk (C:), then the next thing to do is to run a command on windows by holding Windows start button + R or click on the start menu search for command, and click on command prompt. A command prompt will pop-up asking you to type the name of program, folder, document, or Internet resource.

Just as seen in the picture above, type in cmd on the command and hit ENTER on your keyboard. Another command prompt will pop-up with your Computer's manufacturer name. It will look like this:



3. Locate Your Java Folder.

Java Folder

Locate your Java folder. To do this follow this step:

'Go to Windows Explorer >> Local Disk (C:) >> Program Files >> Java >> Java Sub-folder >> Bin.

When you get to Bin click on the folder indicator just as seen in this picture. Right Click the code and copy it.

For example this is how my code looks like. Please don't copy my code, Use yours to make it easier for the system to identify your environment.

C:\Program Files\Java\jre1.8.0_40\bin

So, get your own code and paste it at the command prompt after cd hit ENTER after pasting your code. Here is how my code looks like, and yours should look the same.

Type your java code

 Please click on this image to zoom if you can't view it properly.


4. Copy And Customize This Code


Awesome! We've got to the very last step in generating the Facebook key hash. Please note that if you don't pay proper attention to this step then I am sorry you will not achieve your aim.

So let's get started: Copy and paste this code in your Wordpad, Notepad, Microsoft Excel or any other application your can use to edit this code.

keytool -exportcert -alias androiddebugkey -keystore "C:\Users\HASEE\.android\debug.keystore" | "C:\OpenSSL\bin\openssl" sha1 -binary | "C:\OpenSSL\bin\openssl" base64

So, there you go but notice this code: C:\Users\HASEE\.android It has to be changed to your own code. How can this be done? Follow the step below.

Go to Windows Explorer >> Libraries >> Documents >> .android. 

The step above is where most .android folder can be found. But if yours doesn't appear here then try searching for .android or if you know where it is then you can look for it. Here is how to get the .android code:


So, there you go, Copy the code and paste it somewhere to be used shortly. After copying your code change it from

THIS

keytool -exportcert -alias androiddebugkey -keystore "C:\Users\HASEE\.android\debug.keystore" | "C:\OpenSSL\bin\openssl" sha1 -binary | "C:\OpenSSL\bin\openssl" base64

TO THIS:

keytool -exportcert -alias androiddebugkey -keystore "Paste the code from .android\debug.keystore" | "C:\OpenSSL\bin\openssl" sha1 -binary | "C:\OpenSSL\bin\openssl" base64

After pasting and editing your code then you can now copy the whole code. Go back to the Command Prompt and paste your edited code.

Mine Looks like this.

After editing and pasting your code, hit ENTER on your keyboard and your 28 character code will show up. This is how my 28 character key hash looks like.



But if you are prompted to enter a password, type: Android and then hit ENTER. Your key hash will show up immediately.

After this copy the code and paste it on the Key Hashes' section on Facebook Developers, Click next to continue. Viola! Your key hash has been generated.

If you are a little bit confused then, here is a video which clearly shows you how to generate the key hash. Though the video is silent, Pay proper attention to it.


Or you can choose to download the video here, for those using incompatible mobile devices to stream YouTube videos.

Click here to start download automatically (2.3 MB).


Hope you did enjoy this post stay tuned for more tricks. 








0 Comments:

Post a Comment

Disclaimers:

1. Please avoid the use of offensive or sexually related words in compliance with our Privacy Policy page.

2. Comments above are that of comment writers alone and does not reflect to that of Ebube Udeh or its writers

3. Read our Privacy Policy page before commenting.

5. Avoid SPAM comments.

Hey Niga!, Subscribe Now!

* indicates required

Like my Facebook page

Select Language

StatCounter

View My Stats

Popular Posts