As the title states, I'm trying to post an open graph story and an image explicitly. I've managed to use the object api for when the facebook app is not installed but in the event it is, I would like to use a share dialog so the user can add text. Right now, it allows me to post images to facebook but they aren't visible on my timeline as they are when I upload them via the object api (I don't want to use this api if the facebook app is installed). I've set that the story is explicitly shared on the facebook app and locally I tried to use the following but they don't have any effect:
openGraphAction.setProperty("explicitly_shared", "true")
and the following causes the facebook dialog to close prematurely despite the same method working with the facebook object api.
openGraphAction.setExplicitlyShared(true);
Here is the rest of my code:
OpenGraphObject product = OpenGraphObject.Factory.createForPost("product");
product.setProperty("title", "myTitle");
product.setProperty("description", "myDescription");
OpenGraphAction action = GraphObject.Factory.create(OpenGraphAction.class);
action.setType("myAppName:action"); //Required for OpenGraphActionDialogBuilder
action.setProperty("product", product);
//action.setProperty("explicitly_shared","true");
Bitmap image = generateBitmap();
List<Bitmap> images = new ArrayList<Bitmap>();
images.add(image);
FacebookDialog fbDialog = new OpenGraphActionDialogBuilder(
getActivity(), action, "product")
.setImageAttachmentsForAction(images, true)
.build();
fbDialog.present();
To clarify, I am using a custom opengraphaction which contains an OpenGraphObject of type product.