Key hash for Facebook Android SDK

前端 未结 9 1934
后悔当初
后悔当初 2020-11-28 03:29

I can\'t figure out how to get the Key Hash required to use the Facebook Android SDK. I figured out that I can use keytool with these commands:

         


        
9条回答
  •  一向
    一向 (楼主)
    2020-11-28 04:26

    This is an example of how to get the Key Hash from the Keystore:

    first we need to get the paths of:

    Java path: C:\Program Files\Java\jdk1.6.0_35\jre\bin

    Open SSL Path: C:\OpenSSL-Win32\bin

    (install from: http://www.openssl.org/)

    Keystore Path: C:\Data\ANDROID\KEYSTORE\

    2) then go to Command line and type:

    cd [Java path]

    3) then type :

    keytool.exe -exportcert -alias [alias name] -keystore [Keystore Path]\debug.keystore | [Open SSL Path]\openssl sha1 -binary | [Open SSL Path]\bin\openssl base64

    4) the password of your Keystore must be required and then you have the Hash Key related to your Android Keystore.

    enter image description here

    This is the doc of how to set the Key Hash for Facebook:

    https://developers.facebook.com/docs/android/getting-started#release-key-hash

提交回复
热议问题