由于最近在接facebook的登陆,发现要其中有一步要获取Facebook Key Hash,然后执行官方给的命令行

keytool -exportcert -alias androiddebugkey -keystore ~path~\.android\debug.keystore | openssl sha1 -binary | openssl base64

出现提示openssl不是,,,,然后百度发现装起来挺麻烦,接下来说重点

1、产生Facebook Key Hash需要使用到Openssl这个工具,可以先到openssl for windows下载Binaries Zip这个版本

  下面是链接http://gnuwin32.sourceforge.net/packages/openssl.htm

2、解压缩后可以把openssl-0.9.8h-1-bin\bin\openssl.exe复制到跟你的debug.keystore相同路径下

3、然后打开命令行cmd->cd C:\Users\LX\.android(也是debug.keystore的目录)

4、执行以下命令

  1、 keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64

  2、输入密码  :android

  相关信息如下

  Keystore name: “debug.keystore"
  Keystore password: “android"
  Key alias: “androiddebugkey"
  Key password: “android"
  CN: “CN=Android Debug,O=Android,C=US"

5、接下来会产生一个28位的字符串即是我们需要的Facebook Key Hash啦。

这样就完成了debug key的设定啦,自己用来签署的keystore设定方式也是相同,只要把-alias androiddebugkey以及-keystore debug.keystore更换成自己的设定即可。

相关文章:

  • 2021-05-21
  • 2021-10-29
  • 2022-12-23
  • 2021-04-05
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
猜你喜欢
  • 2021-06-16
  • 2021-08-17
  • 2021-08-10
  • 2022-12-23
  • 2022-02-10
  • 2021-12-11
  • 2021-07-04
相关资源
相似解决方案