4

#GooglePlay 谷歌商店下载的应用登录Facebook报错:invalid key hash

 3 years ago
source link: https://xmanyou.com/facebook-login-failed-with-invalid-key-hash-for-app-downloaded-from-google-play/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
10 May 2021 / google play

#GooglePlay 谷歌商店下载的应用登录Facebook报错:invalid key hash

最近在接入Facebook登录SDK,开发环境下测试正常,发布到谷歌商店后,下载测试时,遇到了奇怪的问题的错误:

Invalid key hash. The key hash xxxxxxxx does not match any stored key hashes. Configure your app key hashes at https://developers.facebook.com/apps/xxxxx

facebook-login-invalid-key-hash-01

明明已经按照Facebook的SDK接入流程进行了接入和测试,并且也添加了发布证书的key hash,为什么又冒出来一个新的未知的key hash呢?

原来,打出来的应用包(不管是aab还是apk)上传到Google Play后台后,会被重新签名,而这个签名证书的hash值没有注册到Facebook后台。

facebook-login-invalid-key-hash-02

获取该证书的hash值的方法:

  • 1). 下载证书
  • 2). 执行以下命令,获取hash值
openssl dgst -sha1 -binary <GooglePlay的发布证书>.der | openssl base64
  • 3). 到Facebook后台注册

阿斌

Read more posts by this author.


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK