There are several steps involved to get the Hash Key.There are quite a few pre-requisites & then you need to get the has key.

The PRE-REQUISITES for facebook sdk:

1)You must have the JDK.(Get it from here)

2)Android SDK(ADT BUNDLE)

         The ADT BUNDLE INCLUDES:

                (This means you do not have to download them(Eclipse,ADT,SDK)  separately)

  • Eclipse + ADT plugin
  • Android SDK Tools
  • Android Platform-tools
  • The latest Android platform
  • The latest Android system image for the emulator

3)Facebook SDK

4)After downloading it, register to create apps.(For this, i recommend you to watch this tutorial)

STEPS TO GET HASH KEY FOR ANDROID PLATFORM

1)Download openssl from Google code (If you have a 64 bit machine you must download openssl-0.9.8e X64 not the latest version)

2)Unzip & extract the files.

3)Copy all files of the bin folder found in  the extracted files & paste it in the JDK’s bin

   For me , it is:  C:\Program Files(x86)\Java\jre7\bin

4)Find keystore path

    You can search the keystore path by:-

              (i)Search debug.keystore in your finder/windows explorer search box

                                         OR

              (ii)You can find the Keystore path using Eclipse. Goto Window->Preference->Android->Build will open up a window as shown below.

image

You can find the Default debug keystore. Copy the path.

 

Put the keystore patth in the following command.

   keytool -exportcert -alias androiddebugkey  -keystore [Key_store_path] | openssl sha1 -binary | openssl enc -a -e

 

5)Now go to command prompt( in windows )or terminal ( in mac) & type

C:\Program Files\Java\jre7\bin>keytool -exportcert -alias androiddebugkey -keystore C:\Users\sarouje\.android\debug.keystore | openssl sha1 -binary | openssl enc -a -e

 

6)Fire a command prompt and paste the command and run it. Tool will generate a key for you.

 

I took a long time to get a hash key ,so i blogged hoping to help.

Feel free to comment & let me know your thoughts & ideas

SOURCES:http://sonyarouje.com/2011/09/18/facebook-hash-key-for-android-apps/ ,   youtube video on hash tag

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s