Skip to main content

Android: How to Generate Key Hash for Facebook Integration


Hello everyone,

As this is a quite confusing for everyone to generate the key hash in your PC, so i decided to write about it. I have also tried many ways but every time i failed to generate the key hash.

After trying for an hour i successfully generated the key.

Just follow the below given Steps and you are done with this.

Step I: Download Openssl from here

Step II: Download openssl-0.9.8e_X64.zip for 64 bit PC and openssl-0.9.8e_WIN32.zip for 32 bit PC

Step III: once your download the zip folder. Go to C drive(where window is installed) and make a folder named openssl

Step IV: extract all zip file in this folder.

Step V: Now go to Java folder and copy path of jre. For example: C:\Program Files\Java\jre1.8.0_101\bin


(make sure your are in JRE folder not in JDK folder,)

Step VI: Now open Cmd in your PC. Type Cd C:\Program Files\Java\jre1.8.0_101\bin
Now copy the below code after this

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

instead of john wick you need to use your computer name. and the C:\openssl\bin\openssl is path where we extracted the zip file.



The whole command will be:

C:\Program Files\Java\jre1.8.0_101\bin> keytool -exportcert -alias androiddebugkey -keystore "C:\Users\John wick\.android\debug.keystore" | "C:\openssl\bin\openssl" sha1 -binary |"C:\openssl\bin\openssl" base64

After this cmd will promt you for password. Just enter “android”.

You will have your key hash in front of you.


Thanks, Happy Coding ;)

Comments

  1. thank you so muccch man <<<<<<3

    ReplyDelete
  2. Thanks for sharing great post....!! I really like this post.

    If you want to make custom website & application you can contact us on our Android Application Development Company and Mobile Application Development Company anytime.

    ReplyDelete
  3. I got here much interesting stuff. The post is great! Thanks for sharing it! Mobile app development company

    ReplyDelete
  4. This is a good post. This post gives truly quality information. I'm definitely going to look into it.Really very useful tips are provided here. Thank you so much. Keep up the good works.

    flutter app

    ReplyDelete
  5. Incredibly conventional blog and articles. I am really very happy to visit your blog. Directly I am found which I truly need. please visit our website for more information about Mobile application development

    ReplyDelete
  6. I am really very happy to visit your blog. Directly I am found which I truly need. please visit our website for more information about Enterprise Mobility Solution Providers in USA

    ReplyDelete
  7. I have seen lot of blogs on Facebook integration but this the best - from Web and Mobile app development in Virginia USA

    ReplyDelete

Post a Comment

Popular posts from this blog

Android: Login Screen using Fragments

In this tutorial, our focus is on making a User/Member login activity using fragments. With the help of Fragments we will use the same activity to show User login area and also Members Login area. Prerequisite for this tutorial: You should be know how to make an Activity And most importantly you should have prior Knowledge of Fragments. For practising basic Fragment implementation refer to Android Simple Fragment Example      We have used only three activities for this: MainActivity(which represents the Login Screen) Fragments for Members area Fragment for New Users

Simple Login/Register Example using SQLite database

MainActivity.java(login Screen) package com.AndroidDevelopmentGuru.database_new; import java.util.List; import android.app.Activity; import android.content.Intent; import android.database.Cursor; import android.os.Bundle; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; public class MainActivity extends Activity {                                 EditText user, pass;                 Button login, not_reg;                 DatabaseHandler db;                 Cursor cursor;                                 @Override                 protected void onCreate(Bundle savedInstanceState) {                                 super.onCreate(savedInstanceState);                                 setContentView(R.layout.activity_main);

Android: Current Location Using Fused APi on Google Maps

This tutorial gives us the simple implementation of "Fused API" to fetch the current location on google map in android. Fused API is latest among all techniques to get the location. It provides you very precise results and also uses less battery of your device. It chooses GPS or Network provider to get to your current location. And it helps your device remember about the last saved location. Let's implement the Fused API to fetch/get the current location. Step 1: Create a new project in Android studio. and select Maps Activity.