Facebook Android Generate Key Hash

后端 未结 21 2074
误落风尘
误落风尘 2020-11-22 04:11

Trying to create an android app with Facebook integration, I\'ve gotten to the part in the docs where you have to generate a key hash file, it specifies to run the following

21条回答
  •  一生所求
    2020-11-22 05:02

    Great blog post on the subject

    Extracting the Key Hash from .p12 key

    1. Open Terminal or Command line and navigate to where your .p12 key is.
    2. Type in: “keytool -v -list -keystore mycert.p12 -storetype pkcs12″ where mycert.p12 is the filename of your .p12 key.
    3. Enter keystore password (the one you used when exported .p12 key). 4 . Copy sha1 fingerprint signature bytes text.
    4. The bytes at sha1 fingerprint signature are needed to write the “sha1.bin” file. You can use a hexadecimal editor to paste the bytes you copied. Afterwards, save the file as “sha1.bin”.
    5. Open terminal again and type in: “openssl base64 -in sha1.bin -out base64.txt”.
    6. The resulting “base64.txt” will contain the Key Hash that is needed for Facebook.

    Great and simple hexadecimal editor for mac: HexFiend

    OpenSSL should be preinstalled on mac, and here is the link for Windows version.

    Link

提交回复
热议问题