对于Facebook的Andr​​oid SDK关键散列关键、Andr、Facebook、SDK

2023-09-12 01:05:28 作者:心稳路正精彩

我不知道如何去使用Facebook的Andr​​oid SDK所需的密钥散列。我想通了,我可以使用密钥工具与以下命令:

 密钥工具-exportcert -alias [别名]
 -keystore [密钥库] | OpenSSL的SHA1 -binary | OpenSSL的ENC -a -e
 

唯一的问题是,我不知道在哪里插入此,我试图通过命令行窗口(WIN7),我试图打开文件keytool.exe的。

解决方案 下载,然后从 http://slproweb.com/products/Win32OpenSSL.html 安装OpenSSL的基于windows 32或64位。(注:下载并安装第一VISUAL C ++从该网站还208 redisributable) 放入Windows路径安装的OpenSSL的bin目录。 打开命令提示符,进入C:\用户{​​}的User_Name .android 现在,把这个命令的CMD密钥工具-exportcert -alias androiddebugkey -keystore debug.keystore | OpenSSL的SHA1 -binary | openssl的的base64 (指的 https://developers.facebook.com/docs/android/getting-started#samples ) 现在,输入密码脸谱没有双引号。 现在,一个哈希键生成 最后去了Facebook的开发者网站。请确保您登录到Facebook和,使用下拉菜单中的右上角,去你的开发者设置: 当你在你的开发人员的设置,从左侧导航中选择示例应用程序,然后添加并保存密钥散列到您的个人资料:

I can't figure out how to get the Key Hash required to use the Facebook Android SDK. I figured out that I can use keytool with these commands:

  keytool -exportcert -alias [alias]
 -keystore [keystore] | openssl sha1 -binary | openssl enc -a -e

The only problem is that I have no idea where to insert this, I tried through command windows (win7) and I tried opening the file keytool.exe.

解决方案

Download and install OpenSSL from http://slproweb.com/products/Win32OpenSSL.html based on windows 32 or 64 bit.(Note: Download and install first visual C++ 208 redisributable from that site also ) Put the bin directory of installed OpenSSL in windows path. Open the command prompt and go to C:\Users{User_Name}.android now put this command on cmd "keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64".(refer https://developers.facebook.com/docs/android/getting-started#samples) Now enter password "facebook" without double quote. Now a hash key will be generated Finally go to the Facebook Developer site. Make sure you are logged into Facebook and, using the dropdown menu in the top-right, go to your 'Developer Settings': Once you're in your developer settings, select 'Sample App' from the navigation on the left, and add and save your key hash into your profile: