Ionic Facebook Api无效密钥哈希 [英] Ionic Facebook Api invalid key hash

查看:93
本文介绍了Ionic Facebook Api无效密钥哈希的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法让我的应用允许Facebook登录.每次用户尝试登录Facebook并使用其FB验证我的应用程序时,都会出现此错误:

I can't get my app to allow Facebook login. Everytime the users tries to login to Facebook and authenticate my app with their FB, it gives me this error:

无效的密钥哈希.他们的密钥哈希xxxxxxxxxx =与任何存储的密钥哈希都不匹配.在 http://developers.facebook.com/apps/xxxxxxxx 上配置您的应用程序密钥哈希>

Invalid key hash. They key hash xxxxxxxxxx= does not match any stored key hashes. configure your app key hashes at http://developers.facebook.com/apps/xxxxxxxx

我已经尝试过像这样通过OpenSSL工具创建新的密钥哈希:

I've already tried creating a new key hash through the OpenSSL tool like so:

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

执行此操作后,我会得到一个密钥哈希,然后将其添加到应用程序开发人员页面上的密钥哈希"列表中.然后,我使用ionic重建应用程序,并且当我在Android手机上运行该应用程序时,也会出现相同的错误.该应用程序的另一个版本是在另一台计算机上构建的,并且使用了不同的哈希键,并且效果很好,但是此计算机上的哈希键似乎不起作用.任何帮助都很好

Doing this gives me a key hash, which I then add into the 'Key Hashes' list on the developer page for the app. I then use ionic to rebuild the app, and when I run it on my android phone it gives the same error. There is another version of the app that was built on another computer, and a different hash key was used, and that worked perfectly, but the hash key from this computer doesn't seem to want to work. Any help would be great

推荐答案

  • Windows 上: keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | openssl sha1 -binary | openssl base64
  • Mac 上: keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
    • On Windows: keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | openssl sha1 -binary | openssl base64
    • On Mac: keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
    • 密码是Android.

      另请参阅离子文档.

      这篇关于Ionic Facebook Api无效密钥哈希的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆