Android-facebook Keyhash Set

Source: Internet
Author: User
Tags base64 openssl sha1 sha1

Transferred from: http://www.dotblogs.com.tw/newmonkey48/archive/2014/04/17/144779.aspx

App to use Facebook to share, set the app's key hash in the Facebook app

But how is keyhash going to get it?

Two sites can be tested

Http://blog.changyy.org/2011/05/android-facebook-sdk.html

http://blog.rx836.tw/blog/android-facebook-key-hashes/

Need to download OpenSSL

http://blog.rx836.tw/blog/android-facebook-key-hashes/

After downloading, decompress, as below, to the bottom of the bin material to obtain Openssl.exe

C:\Users\Tom\Downloads\openssl-0.9.8h-1-bin\bin

Put it in the Java catalogue below

C:\Program Files\java\jdk1.6.0_23\bin

and get keystore placement from eclipse.

[WINDPW], [Preferences], [Android], [Build] Default debug KeyStore

What I have got here is

C:\Users\Tom\.android\debug.keystore

Then use the Keytool under Java bin to get Keyhash

Make the following command

Keytool-exportcert-alias Androiddebugkey-keystore C:\Users\Tom\.android\debug.keystore | OpenSSL sha1-binary | OpenSSL base64

will display the following and enter the preset password for Android

Enter KeyStore Password: Android

You'll get Keyhash.

And then to the Facebook---management application----your own application----the key hash is filled in with the keyhash.

Debug.keystore's preset information is as follows

Keystore Name: "Debug.keystore"
Keystore Password: "Android"
Key alias: "Androiddebugkey"
Key Password: "Android"
CN: "Cn=android debug,o=android,c=us"

So the password only fills Android

Attention:

The alias and password that cannot be played will affect the results of keyhash, and must be the same as the alias and password at the time.

Mac Platform

    1. First open a terminal (open a command prompt in Windows).
    2. Navigate in the terminal to the directory where your Android debug.keystore is stored.
    3. Mostly It'll located under "/users/user_name/.android/" (in Windows would be C:\Documents and settings\.android).
    4. Once you is in the ". Android" directory, run the following command.

      Keytool-exportcert-alias Androiddebugkey-keystore Debug.keystore | OpenSSL sha1-binary | OpenSSL base64

    5. When it prompts to a password, type android and hit Enter

    6. Copy the value printed in the terminal, which ends with a "=" and paste it in the Key Hash field in Facebook. Then click the Save Changes button.

Android-facebook Keyhash Set

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.