获取无效android_key参数错误,第一次登录Facebook的Andr​​oid SDK中后 [英] Getting invalid android_key parameter error, after first time login in Facebook Android SDK

查看:291
本文介绍了获取无效android_key参数错误,第一次登录Facebook的Andr​​oid SDK中后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用了哈希键从我的调试存储

I have got the hash key from my debug store using

密钥工具-exportcert -alias androiddebugkey -keystore C:\ Users \用户user.android \ debug.keystore | OpenSSL的SHA1 -binary | OpenSSL的ENC -a -e

keytool -exportcert -alias androiddebugkey -keystore C:\Users\user.android\debug.keystore | openssl sha1 -binary | openssl enc -a -e

和粘贴的关键,Facebook应用程序的Andr​​oid和同时启用脸谱登录选项。

and pasted the key to Facebook App for Android and also enabled "Facebook Login" option.

当我第一次登录到我的Andr​​oid应用程序,它显示了我的权限对话框,并给予许可后,我能得到我的信息来自Facebook。

When I first time log into my Android App, it shows me a permission dialog and after giving the permission, I am enable to get me details from Facebook.

但在那之后,当我退出和应用程序,然后再次打开,尝试登录,它显示了屏幕下方。

But after that when i exit and the app and again open and try to login, it shows below screen.

我不明白这一点,如果哈希关键是问题,那么为什么它在第一次尝试。

I don't get this, if hash key is the issues, then why it works in first attempt.

我使用Facebook的SDK旧版本没有新的3 +版本。

I am using facebook sdk old version not the new 3.+ version.

推荐答案

解决了问题,增加了offline_access,也是Hashkey的许可应与出现在错误的关键。 使用密钥散列的apk可在轻松的Facebook SDK网站,在手机上安装它获得哈希键或使用密钥工具插件,让您的密钥存储的SHA1,然后将其转换从这里 。和添加此键,您的注册项目的.. :) 希望这有助于@Pratick

Solved the issues, added permission of "offline_access" and also the Hashkey should match the key which appears in error. Use "Key Hash" apk available at Easy Facebook SDK website, install it on phone to get the HASH KEY or use KEYTOOL plugin to get the SHA1 of your keystore and then convert it to base64 from here. and add this key to your register project.. :) Hope this helps @Pratick

这篇关于获取无效android_key参数错误,第一次登录Facebook的Andr​​oid SDK中后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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