keytool与Android Facebook SDK [英] keytool with Android Facebook SDK

查看:129
本文介绍了keytool与Android Facebook SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想要一些确认。



我正在Windows上开发



我试图将Facebook整合到应用程序中,SDK文档说我需要导出签名

从这里: http://developers.facebook.com/docs/guides/mobile/#android



所以说运行这个命令:

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

首先我必须下载openssl: OpenSSL



现在上面的命令,我假设应该转换为:

 C:\path \to\java\keytool-exportcert -alias your_alias -keystoreC:\path\to\your\keystore\keystore.name| C:\path\to\openssl_install\bin\opensslsha1 -binary |C:\path\to\openssl_install\bin\opensslbase64 




  • 所以你想要安装在最新的Java安装文件夹中的keytool?

  • 您希望别名是在eclipse中用于正常的apk创建的别名的名称?

  • 您希望密钥库是导出Android时使用的密钥库应用程序?

  • 您希望openssl是您刚刚安装的那个。



所以一旦我'已经这样做了,它要求输入密码:(在输入密码时显示密码)



如果我输入正确的密码,我得到


'zR2tey1h9kqPRSW / yEYEr0ruswyD ='(公开更改)


但是如果我输入错误的密码,它仍会以


'ga0RGNYHvTR5d3SVDEfpQQAPGJ1 ='?


所以是的,只是在寻找一个确认,我在做正确的事情,这是预期的输出

解决方案

是的,您正在以正确的方式进行此操作,我认为也执行这个命令,并将这个哈希放在我的fb应用程序中,它的工作正常。


I just want some confirmation.

I'm developing on windows

I'm attempting to integrate facebook into an app and the SDK documentation says I need to 'export a signature'

From here: http://developers.facebook.com/docs/guides/mobile/#android

So it says run this command:

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

First I had to download openssl: OpenSSL

Now the command above, I assume should be converted to:

"C:\path\to\java\keytool" -exportcert -alias your_alias -keystore "C:\path\to\your\keystore\keystore.name" | "C:\path\to\openssl_install\bin\openssl" sha1 -binary |"C:\path\to\openssl_install\bin\openssl" base64

  • So you want the keytool that is installed in your latest Java install folder?
  • You want the alias to be the name of the alias you use for a normal apk creation in eclipse?
  • You want the keystore to be the one you use when exporting android apps?
  • You want openssl to be the one you just installed

So once I've done this it asks for a password: (it shows the password as I'm typing it)

If I enter a correct password I get

'zR2tey1h9kqPRSW/yEYEr0ruswyD=' (changed for public)

but if I enter an incorrect password it still returns me a code in the form of

'ga0RGNYHvTR5d3SVDEfpQQAPGJ1='?

So yeah, was just looking for a confirmation that I'm doing the right thing, and this is the output expected

解决方案

yes you are doing it in a right way i think.i also execute this command and put this hash in my fb app and its works properly.

这篇关于keytool与Android Facebook SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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