生成密钥时出现问题 - Android
我正在尝试从我的应用程序中获取与 Facebook 集成的密钥。 我已遵循 Android 开发人员上的《签署应用程序指南》(http://developer.android.com/guide/publishing/app-signing.html#setup) 和 Android Facebook 指南(http://developers.facebook .com/docs/guides/mobile/#android)。
我的问题是我不知道如何从密钥库正确获取密钥。 这是我在 cmd 中所做的 -
keytool -exportcert -alias androiddebugkey -keystore C:\Users\Mickael.android\debug.keystore
然后它要求输入密码,然后向我显示一个很长的乱码密钥。 现在我知道密钥已加密。 Facebook 指南提供了 2 个命令 -
| openssl sha1 - 二进制
| openssl base64
但我不知道如何让它们工作。
这是问题的图片 - http://img543.imageshack.us/i/keyfail.jpg/
我可以真的需要一些帮助,
提前致谢!
I'm trying to get the key hesh from my app for integration with Facebook.
I've followed the Signing your Application guide on the Android Developers(http://developer.android.com/guide/publishing/app-signing.html#setup), and the Android Facebook guide(http://developers.facebook.com/docs/guides/mobile/#android).
My problem is that I don't know how to properly get the key hesh from the keystore.
Here's what I do in the cmd -
keytool -exportcert -alias androiddebugkey -keystore C:\Users\Mickael.android\debug.keystore
Then it asks for a password, and then shows me a very long gibberish key.
Now I know that key is encrypted. The facebook guide offers 2 commands -
| openssl sha1 -binary
| openssl base64
But I don't know how to get them to work.
Here is a picture of the problem -
http://img543.imageshack.us/i/keyfail.jpg/
I could really use some help
Thanks in advanced!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您显示的输出未经过 Base64 编码器。确保您在单行中完成下面的整行。这篇文章使它看起来像新行,但它们都需要作为单个命令运行。
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore
| openssl sha1-二进制
| openssl base64
The output you are showing isn't going through the base64 encoder. Make sure you do the entire line below in a single line. The post makes it look like new lines, but they all need to be run as a single command.
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore
| openssl sha1 -binary
| openssl base64
请参阅:
Facebook Android SDK 的密钥哈希
See:
Key hash for Facebook Android SDK