简体   繁体   English

Session.getActiveSession()无法在Facebook SDK 3.5 Android中检索正确的会话

[英]Session.getActiveSession() not retrieving the correct session in facebook sdk 3.5 android

I have annoying problem with facebook sdk 3.5, I have made an example and it is works fine but from about a week it start behaving in a wrong way 我在使用sdk 3.5时遇到了烦人的问题,我举了一个例子,它可以正常工作,但是从大约一个星期开始,它就开始以错误的方式运行

the method Session.getActiveSession() return always a session with the following properties : Session.getActiveSession()方法始终返回具有以下属性的会话:

{
  Session state:OPENING, 
  token:
    {
      AccessToken token:ACCESS_TOKEN_REMOVED 
      permissions:[]
    }, 
  appId: ??
}

after I enter my username and password and press the login button it direct me to the screen that say that the user already authorize this application and when get back to my activity it doesn't share or do anything 输入用户名和密码并按登录按钮后,它会将我定向到屏幕,提示用户已经授权了该应用程序,返回到我的活动后,它不共享或不执行任何操作

this problem happen when the sdk fail to connect to the installed application and open the web browser to take user data 当SDK无法连接到已安装的应用程序并打开Web浏览器以获取用户数据时,会发生此问题

My problem is the same as the question sent in this post . 我的问题与此帖子中发送的问题相同。

You need to add 您需要添加

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    Session.onActivityResult()...
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM