在 Android 上获取 facebook 应用程序签名的正确 keytool 命令是什么?

发布于 2024-12-12 14:07:35 字数 634 浏览 2 评论 0原文

我正在尝试使用 openssl 导出我的应用程序的密钥。我遵循了 facebook 开发人员指南,但在涉及 keytool 命令时我陷入了困境。

Facebook 是这样的:

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

我的也是这样:

"C:\Program Files\Java\jdk1.6.0_23\bin\keytool" -exportcert -alias androiddebugkey -keystore "C:\Users\blah\.android\debug.keystore" | "C:\blah\bin\openssl" sha1 -binary |"C:\blah\bin\openssl" base64

我以管理员身份运行 openssl.exe。当我运行上述命令时,它显示 "Openssl Error: "C:\program files\java\jdk1.6.0_23\bin\keytool"" 是无效命令。

请帮忙!谢谢

I am trying to use openssl to export the key for my app. I followed the facebook developers guide but I am stuck when it comes to the keytool command.

Facebook has it this way:

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

I have mine this way:

"C:\Program Files\Java\jdk1.6.0_23\bin\keytool" -exportcert -alias androiddebugkey -keystore "C:\Users\blah\.android\debug.keystore" | "C:\blah\bin\openssl" sha1 -binary |"C:\blah\bin\openssl" base64

I run openssl.exe as an administrator. When I run the above command, it says "Openssl Error: "C:\program files\java\jdk1.6.0_23\bin\keytool"" is an invalid command.

Please help! Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

雨轻弹 2024-12-19 14:07:35

我通过执行以下操作让它在 Windows 7 上工作:

  1. 将整个 bin 目录从 openssl 安装复制到 keytool 所在的 jdk.xx\bin 目录。

  2. 运行 facebook 文档中所示的命令,如下所示:

    keytool -exportcert -alias androiddebugkey -keystore C:\Users\MYUSER\.android\debug.keystore | openssl sha1 - 二进制 | openssl base64
    
  3. 它要求输入密码(仅一次),即 android

这对你有用

I got it to work on Windows 7 by doing the following:

  1. Copy the entire bin directory from the openssl install to the jdk.x.x\bin directory where the keytool is.

  2. Run the command as shown in the facebook doc as follows:

    keytool -exportcert -alias androiddebugkey -keystore C:\Users\MYUSER\.android\debug.keystore | openssl sha1 -binary | openssl base64
    
  3. It asks for a password (only once) which is android

Hope this works for you

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文