1

I check some issues similary to mine,and know it may be wrong about my Override method,but I couldn't find where the problem is.In main activity I Override the onActivityReslut:

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

facebookLoginPlugin is a instace of Class FBLogin;

facebookLoginPlugin = new FBLogin(this);

and in FBLogin I call onActivityResult like this:

public void onActivityResult(int requestCode,int resultCode,Intent data)
{
    uiHelper.onActivityResult(requestCode, requestCode, data);
    Session session = Session.getActiveSession();
    session.onActivityResult(activity, requestCode, resultCode, data);

    Log.i(TAG,"onActivityResult ====="+session.isOpened()+"   "+session.isClosed());
    String status = getStatus(0);
    Log.i(TAG,"status of facebook now is "+status);
    Log.i(TAG,"resultCode ="+resultCode);
}

but when I loggin to facebook I got session.isOpend()==false,and the status now is "Openging",I am sure the keyhash and the appid can work for the sampleHellofacebook,and the dashboad implement that I am loginto the app ,please help,thanks.

Wen Tang
  • 11
  • 3
  • I am using facebook sdk3.2 ,that's a wrong put – Wen Tang Apr 01 '15 at 06:43
  • 2
    Visit this [link][1] for your answer.Varun madhvani is right. [1]:http://stackoverflow.com/questions/29358093/android-login-with-facebook-sdk-4-0/29361346#29361346 – Neal Ahluvalia Apr 01 '15 at 06:44
  • I using my own button instead of LoginButton,the button I use is create by lua , and I just use the callback via javaluaBridge,I don't know does it make difference @NealPatel – Wen Tang Apr 01 '15 at 07:06

0 Answers0