使用Facebook sdk生成应用程序的哈希键 [英] Generating hash key for app using facebook sdk
问题描述
我正在使用facebook sdk登录我的应用程序。
应用程序在HTC设备上运行正常。
如果没有安装Facebook应用程序,则三星设备上的应用程序也可以正常使用。
I am using facebook sdk for login into my application. The application runs fine on HTC devices. The application also works fine on Samsung devices if there is no facebook app pre installed.
但是如果手机上已经有Facebook应用,然后用户安装我的应用程序,用户从未登录。
从我所知道的,我认为这可能是单点登录的问题,我认为这与生成正确的应用程序哈希密钥有关,并使用散列键在Facebook应用程序中,我曾经登录到移动应用程序。
But if there is already facebook app on mobile and then the user installs my app, the user is never logged in. From what I know, I think this might be a problem of single sign on, and I think this is somewhat related with generating proper application hash key, and using the hash key in facebook application which I used to log into the mobile app.
请指导我如何创建哈希键。我正在运行ubuntu 10.4。
Please guide me how to create the hash key. I am running ubuntu 10.4.
当我在终端中运行此命令时: -
When I run this command in terminal :-
keytool -exportcert -alias <your keystore alias name>.keystore -keystore ~/.android/<your keystore name>.keystore | openssl sha1 -binary | openssl base64
我从来没有提示输入密码,虽然我被给了哈希密钥。
I am never prompted for password, though I am given the hash key.
推荐答案
尝试这样:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
我希望你能得到它。我刚检查过,我得到了密码提示。
I hope you will get it. I just checked it and I got the prompt for password.
这篇关于使用Facebook sdk生成应用程序的哈希键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!