Steps for generating Key Hashes by integrating Facebook sdk with Android

Source: Internet
Author: User

Steps for generating Key Hashes by integrating Facebook sdk with Android

As shown in, when using the facebook sdk for login and share, you need to create an android platform and use key hashes to generate two methods:

Method 1:

Keytool-exportcert-alias 'nom Nom eat'-keystore nomnom. jks | openssl sha1-binary | openssl base64

Note:

1. Use the preceding command to replace the items following-alias and-keystore. You only need to replace these two items.

2.-alias is followed by the alias corresponding to the creation of your own keystore. -The keystore is followed by a signed file. I use the jks format.

3. In the displayed dialog box, you only need to fill in the key hashes during the formal packaging, and do not need to fill in the debug.

4. If debug is required, use the command 1 to generate a new one.

Supplement:

Of course, you can use the same signature file for debug and release. For settings, see:

 

You can see the following in build. gradle of the main module in the project:

 

signingConfigs {    release {        storeFile file(nomnom.jks)        storePassword 123aa678        keyAlias Nom Nom Eat        keyPassword bc3a678    }}buildTypes {    release {        minifyEnabled false        signingConfig signingConfigs.release    }    debug {        signingConfig signingConfigs.release    }}
The signature item corresponding to debug under buildTypes is.

 

 

Method 2: no command is required. Mob provides an apk. First, install your own signed apk and then install it. After Entering the package name, the key hashes is automatically calculated.

 

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.