I’m not sure if I’m doing something wrong or if this is a bug in the Facebook API but in my callback for a Facebook wall post the onComplete gets fired regardless of if I press “POST” or if I press “CANCEL”. And I can’t provoke the onCancel no matter what I do… has anyone else dealt with this, and if so, what’s the work around?
Here’s my code…
myApp.facebook.dialog(context, "feed", b, new Facebook.DialogListener() {
@Override
public void onFacebookError(FacebookError e) {
Log.d(Constants.TAG, "FBError " + e);
}
@Override
public void onError(DialogError e) {
Log.d(Constants.TAG,"FBDialog Error " + e);
}
//THIS GETS CALLED NO MATTER WHAT THE USER DOES
@Override
public void onComplete(Bundle values) {
Log.d(Constants.TAG,"FB CONFIRM");
user.setPostedToFacebook(2);
startActivity(new Intent(context, Survey.class));
finish();
}
//THIS NEVER GETS CALLED
@Override
public void onCancel() {
Log.d(Constants.TAG,"FB CANCEL");
user.setPostedToFacebook(1);
startActivity(new Intent(context, Survey.class));
finish();
}
});
TIA
Well… in the way of an update, facebook has confirmed that it is a bug and has filed it.
http://developers.facebook.com/bugs/198419313569151