使用Facebook凭据登录我的应用程序 [英] Use Facebook credentials to log my application
问题描述
我要添加与Facebook按钮,我的应用程序登录。于是,我就按照本指南。
I want to add log in with Facebook button to my application. So i tried to follow this guide.
我试图让Android的密钥散列。但我不能在我的电脑CMD运行它。
I tried to get Android key hash. But i couldn't to run it on my PC cmd.
这是code我试过了。
This is code i tried.
我将我的主路径到此%HOMEPATH%
。
keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | openssl sha1 -binary | openssl base64
但它显示了这样的错误。
But it shows like this error.
谁能帮我解决这个错误。
Can anyone help me to fix this error.
推荐答案
首先从这个下载的OpenSSL的链接
Firstly download openssl from this a link
二解压到本地磁盘C:将其命名为openssl可以即文件夹名称
Second extract it to Local disk C: name it openssl i.e folder name
第三套它的环境变量。步骤如下:
third set it in Environment variables. procedure as follows
右键点击我的电脑 - >属性 - >高级 - >环境变量
在系统变量 - >点击路径,然后单击修改
现在插入一个;分号并粘贴文件夹的OpenSSL的路径。然后确定。
Now insert a ';' semi-colon and paste the path of folder openssl. then ok.
现在可以看出U OpenSSL是公认的cmd命令。
now u can see openssl is recognized as command in cmd.
获得KeyHash执行follwing CMD
to get KeyHash execute follwing cmd
keytool -exportcert -alias androiddebugkey -keystore "path of ur debug.keystore" | "C:\openssl\bin\openssl.exe" sha1 -binary | "C:\openssl\bin\openssl.exe" base64
解决方案警告---
Solution for the warning---
WARNING: can't open config file: C:/OpenSSL/openssl.cnf
WARNING: can't open config file: C:/OpenSSL/openssl.cnf
openssl:Error: 'base' is an invalid command.
1下面添加在环境变量行类似,第三步。
1st add below line in environment variable as similar to third step.
设置 OPENSSL_CONF = C:\\ OpenSSL的\\ BIN \\ openssl.cfg
现在上面运行CMD
keytool -exportcert -alias androiddebugkey -keystore "path of ur debug.keystore" | "C:\openssl\bin\openssl.exe" sha1 -binary | "C:\openssl\bin\openssl.exe" base64
ü做得到警告,但keyHash在CMD ...
u do get warning but keyHash is returned in cmd...
这篇关于使用Facebook凭据登录我的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!