如何正确生成fb keyhash使登录工作在.apk文件上 [英] How properly generate fb keyhash to make login works on .apk file

查看:674
本文介绍了如何正确生成fb keyhash使登录工作在.apk文件上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是,当我的应用程序安装在我的手机上通过在eclipse中debbuging安装时,fb登录工作正常。当我尝试通过导出的.apk文件安装它时,我收到消息:应用程序想要访问您的公开个人资料和朋友名单,如果我点击确定没有任何反应。



我创建这里的问题和评论我读了我应该为.apk文件生成另一个哈希键的建议。



首先我去eclipse->右键点击我的项目 - > android工具 - >导出签名的应用程序包



其次我发现这里的答案,如何获得签名的Facebook apk的哈希键。



我在导出项目到文件期间创建的密钥仓库是:
C:\Users\Group\Desktop\albert\和由keystore命名,所以我在命令提示符下写这行这个命令提示符

  C:\程序文件(x86)\Java\\ \\ C:\OpenSSL\bin\openssl
sha1 -binary | C:\OpenSSL\bin\opensslbase64

我被要求输入密码这是我用来创建密钥库的。然后我得到哈希码,但把它放到Facebook开发人员面板后,登录仍然不起作用。



如何解决这个登录问题?这个问题让我生病了:/

解决方案

在导出应用程序时创建新的密钥库文件时,错误是别名,你需要给出我标记的别名。这个名字你需要放在你的命令提示符下。





所以不如我所做,因为我把我的文件名称keystore,但把那里你的别名,一切都会正常的p>

my problem is that fb login works properly when my app is installed on my phone by debbuging in eclipse.When I try to install it by exported .apk file, I get the message: "app would like to get access to your public profile and list of friends" if i click ok nothing happens.

I create here the question and in comment I read the suggestion that I should generate another hash key for my .apk file.

Firstly I go to eclipse-> right click on my project -> android tools -> Export signed application package

Secondly I found the answer here, how to get the hash key for signed facebook apk.

My keystore which I create during the exporting project to file is there: C:\Users\Group\Desktop\albert\ and is named by keystore, so I write this lines in command prompt

C:\Program Files (x86)\Java\jdk1.7.0_51\bin>keytool -exportcert -alias keystore
-keystore "C:\Users\Group\Desktop\albert\keystore" | "C:\OpenSSL\bin\openssl"
sha1 -binary | "C:\OpenSSL\bin\openssl" base64

I was asked for password and typed this one which I used for creating keystore. Then I get the hashcode, but after putting it into facebook developer panel, the login still doesn't work.

How to solve this login problem? This issue make me sick :/

解决方案

Mistake was in alias, when you create new keystore file during exporting your app, you need to give a alias this which I mark. This same name you need to put to your command prompt.

so not as I done, cause I put my file name "keystore" but put there your alias name and everything will be alright

这篇关于如何正确生成fb keyhash使登录工作在.apk文件上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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