android-simple-facebook icon indicating copy to clipboard operation
android-simple-facebook copied to clipboard

PublishPhotoDialogAction is not catching Facebook.Callback events

Open leokillemoll opened this issue 10 years ago • 1 comments

I'm trying to catch the events like 'onComplete' or 'onFail' when executing the '.publish' method of a bitmap, but these events are never executed. Debugging I realized that the events 'onError' or 'onComplete' of the Facebook.Callback called at PublishPhotoDialogAction (at executeImpl method specifically) do never execute.

This only happens when I set to True using the 'withDialog' parameter, when it is set to False the events are correctly executed.

The photos I'm uploading are successfully uploaded, but I need to catch these events. Any idea of why this is happening?

I'm using latest Android-Simple-Facebook and the latest Facebook SDK (3.23.0)

The code I'm executing:

BitmapFactory.Options options = new BitmapFactory.Options(); options.inPreferredConfig = Bitmap.Config.ARGB_8888; Bitmap bitmap = BitmapFactory.decodeFile(picture, options);

// create Photo instance and add some properties Photo photo = new Photo.Builder() .setImage(bitmap) .setName(name) .build(); //If mUseNativeApp is set to true, no events are executed //mUseNativeApp is set to true if the Native Facebook app is installed. SimpleFacebook.getInstance().publish(photo, mUseNativeApp, new OnPublishListener() {

@Override
public void onException(Throwable throwable) {
    Log.e("ChallengeFacebook", "onException:" + throwable.getMessage());
}

@Override
public void onFail(String reason) {
    Log.e("ChallengeFacebook", "OnFail:" + reason);
}
@Override
public void onThinking() {
    Log.d("ChallengeFacebook", "Thinking....");
}

@Override
public void onComplete(String response) {
    Log.d("ChallengeFacebook", "onComplete:" + response);
}

});

leokillemoll avatar Feb 10 '15 01:02 leokillemoll

:+1: the same problem I am facing too.

spirosoik avatar May 14 '15 10:05 spirosoik