首页 > 解决方案 > 密钥哈希与 facebook react-native 应用程序中存储的任何密钥哈希不匹配

问题描述

我正在开发 react-native 最新版本 60+。我在调试模式下集成了 facebook 登录,但出现问题错误:

Error: SERVER_ERROR: [code] 1349195 [message]: The key hash does not match any stored key hashes. Go to https://developers.facebook.com/docs/facebook-login/android for more information. [extra]:

我打开新终端并使用 is 命令获取密钥哈希:

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

并在 facebook 开发人员上添加 bebug 密钥哈希。但我得到了错误。

标签: react-nativereact-native-fbsdk

解决方案


尝试使用文件android/app/debug.keystore

cd <your project>

然后

keytool -exportcert -alias androiddebugkey -keystore android/app/debug.keystore | openssl sha1 -binary | openssl base64

推荐阅读