在接入FaceBook第三方登錄的時候,需要獲取Android Hash Key。
Android Hash Key即密鑰散列有兩種,一種是開發秘鑰散列,一種是發布秘鑰散列。這里主要介紹如何獲取開發秘鑰散列Debug Android Hash Key。
步驟如下:
1、到https://code.google.com/archive/p/openssl-for-windows/downloads?authuser=1下載openssl-0.9.8k_X64.zip(電腦64位的),然后解壓放在C盤
2、打開命令窗口,進入jre的bin目錄()
3、輸入如下的命令
keytool -exportcert -alias androiddebugkey -keystore "C:\Users\Administrator\.android\debug.keystore" | "C:\openssl-0.9.8k_X64\bin\openssl" sha1 -binary | "C:openssl-0.9.8k_X64\bin\openssl" base64
便可在結果中看到一個28位字符,那便是Debug Android Hash Key