As shown, when you use the Facebook SDK for login and share, you need to create a new Android platform with key hashes, which can be generated in two ways:
Method One:
Keytool-exportcert-alias ' nom nom Eat '-keystore nomnom.jks |openssl sha1-binary | OpenSSL base64
Precautions:
1, use the above command please replace the-alias and-keystore behind the things, only need to replace these two places.
2,-alias is followed by their own keystore when the corresponding alias, can not be filled. -keystore behind is the signed file, I use the JKS format.
3, shown in the dialog box only need to fill in the formal packaging of the key hashes, do not need to fill in the Debug.
4, if Debug is required, refer to 1 to regenerate using the command.
Add:
Of course, you can use the same signature file for debug and release, see:
You can then see the following in the build.gradle of the main module in the project:
Signingconfigs {release {StoreFileFile"Nomnom.jks")Storepassword"123aa678" Keyalias"nom nom Eat" Keypassword"bc3a678" }}buildtypes {release {minifyenabledfalse SigningconfigSigningconfigs. release} debug {SigningconfigSigningconfigs. Release}}
buildtypes The corresponding signature entry for debug is.
Method 2: No need to use the command, mob provided an APK, first install their own signed apk, and then install the APK, enter the package name will automatically calculate the key hashes.
apk Download Link: http://download.csdn.net/detail/yanzi1225627/9319119
Add a FAQ: http://bbs.mob.com/forum.php?mod=viewthread&tid=8134&extra=page%3D1
Android integrated Facebook Sdk,key hashes build step