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.