3

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.

Mitch
  • 31
  • 5
  • Have you found anything for this? – stack Feb 17 '14 at 18:46
  • 2
    Not really no, right now I'm just using intents to open the fb app for sharing. It's not great but it works for now I guess.... – Mitch Mar 03 '14 at 17:04
  • OG objects shared via the share dialog should be by default "explicitly shared", and you shouldn't have to add additional properties. It's not showing up in feed or timeline at all? – Ming Li May 08 '14 at 21:10

0 Answers0