2

I bound a login button to the facebook.authorize() method, of which I expect it to open the intent to the Facebook SSO Activity. I tapped on it, it does change screen (animation shown), but closes back to my original activity. So it opens and closes, and nothing happens.

private void initFacebook() {
    facebook.authorize(this, new DialogListener() {
        @Override
        public void onCancel() {
        }

        @Override
        public void onComplete(Bundle values) {
        }

        @Override
        public void onError(DialogError e) {
        }

        @Override
        public void onFacebookError(FacebookError error) {
        }
    });
}

private void initLoginButton() {
    ImageButton loginButton = (ImageButton) findViewById(R.id.loginButton);
    loginButton.setOnClickListener(new ImageButton.OnClickListener() {

        @Override
        public void onClick(View v) {
            initFacebook();
        }
    });
}

May I know what is happening here? I do have Facebook app installed on my phone. Thanks for your help in advance!

nubela
  • 1
  • 24
  • 75
  • 123

1 Answers1

0

You are most probably not implementing the onActivityResult as described in the same question: Android Facebook.authorize don't call oncomplete method

Community
  • 1
  • 1
Daniel Novak
  • 2,746
  • 3
  • 28
  • 37