本文介绍了总是让会话状态:CLOSED_LOGIN_FAILED,令牌:{AccessToken令牌:ACCESS_TOKEN_REMOVED在Facebook的Andr​​oid SDK3.0。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

总是让会话状态:CLOSED_LOGIN_FAILED,令牌:{AccessToken令牌:ACCESS_TOKEN_REMOVED在Facebook的Andr​​oid SDK3.0。甚至当我运行由facebook的SDK它的身份验证,而不是重定向到下一flow.it给出的例子显示了previous页面本身。

Always getting Session state:CLOSED_LOGIN_FAILED, token:{AccessToken token:ACCESS_TOKEN_REMOVED in facebook android sdk3.0. Even when i run the examples given by the facebook sdk its authenticating and not redirecting it to next flow.it displays the previous page itself.

推荐答案

由于某些原因,哈希的密钥工具正在生成对我来说是不一样的我的应用程序。这是为我工作。利用Facebook的提供的标准code生成一个散列:

For some reason, the hash that the keytool is generating for me isn't the same as my app. This is what worked for me. Generate a hash using the standard code provided by facebook:

PackageInfo info = getPackageManager().getPackageInfo("<your_package_name>",  PackageManager.GET_SIGNATURES);

for (Signature signature : info.signatures)
    {
        MessageDigest md = MessageDigest.getInstance("SHA");
        md.update(signature.toByteArray());
        Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
    }

请务必与您相应的包名称取代your_package_name>。看的logcat和抢keyhash并在你的Facebook应用程序设置输入。

Make sure to replace "your_package_name>" with your corresponding package name. Look at logcat and grab the keyhash and enter it in your facebook app settings.

这篇关于总是让会话状态:CLOSED_LOGIN_FAILED,令牌:{AccessToken令牌:ACCESS_TOKEN_REMOVED在Facebook的Andr​​oid SDK3.0。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 06:58