FB本地登录SessionState会CLOSED_LOGIN_FAILED [英] FB native login SessionState CLOSED_LOGIN_FAILED

查看:172
本文介绍了FB本地登录SessionState会CLOSED_LOGIN_FAILED的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有几个这样的其他问题,但没有从那里工作。

I know there are couple of other questions like this, but nothing worked from there.

在code是从这里 HTTPS://developers.facebook。 COM /文档/安卓/登录,与Facebook的
有没有修改。

The code is from here https://developers.facebook.com/docs/android/login-with-facebook There are not modifications.

当我登录FB总是返回CLOSED_LOGIN_FAILED。

When i am logging FB always returns CLOSED_LOGIN_FAILED.

我生成密钥散列这一点:

I generated Key Hash with this:

密钥工具-exportcert -alias androiddebugkey -keystore〜/ .android / debug.keystore | OpenSSL的SHA1 -binary | OpenSSL的BASE64

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

和这个检查了它:

try {
        PackageInfo info = getPackageManager().getPackageInfo(
                "com.example.facebooktest", PackageManager.GET_SIGNATURES);
        for (Signature signature : info.signatures) {
            MessageDigest md = MessageDigest.getInstance("SHA");
            md.update(signature.toByteArray());
            String s = Base64.encodeToString(md.digest(), Base64.DEFAULT);
            Log.d("KeyHash:", s);
        }
    } catch (Exception e) {
    }

所以,问题不在于关键。我已经检查和双重检查一切,但我仍然不从那里来了问题的认识。

So the problem is not with the key. I have checked and double checked everything but i still don't know from where is the problem coming.

我试图来与SDK和他们都返回相同的东西全部样本应用程序。我也尝试了在3个​​不同的设备相同的问题。

I tried all the sample apps that come with the SDK and all of them return the same thing. Also i tried it on 3 different devices same problem.

谁能帮助?

推荐答案

我有同样类型的问题,那里的Facebook应用程序将永远不会给我一个活动会话。如果未安装该应用程序(也通过使用日志的WebView到Facebook),它没有怎么过的工作。我没有改变任何东西,并与生产出来密钥签名(一如既往,这从来没有引起任何问题)。

I've had the same type of problem, where the facebook app would never give me an active session. If the app wasn't installed (there by using the WebView for log in to facebook) it did how ever work. I hadn't change any thing, and was signing with out production key (as always, which have never caused any problems).

但是我发现了,我不得不更新facebook的仪表盘哈希值(其实,我在那里生产的关键是现在的两倍..?),并立即开始干活。不知道为什么,或者是什么固定的,但不知何故,固定它。

What i found was that i had to update the hashes in the facebook dashboard (i actually have the production key in there twice now..?), and it immediately started to work.I have no idea why or what it fixed, but somehow it fixed it.

希望它帮助。

这篇关于FB本地登录SessionState会CLOSED_LOGIN_FAILED的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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