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!