0

I am using the Facebook SDK for Android, because I want allow users to share an image generated in the app + a message which I would like to set already as suggestion.

I tried using the new ShareDialog, but somehow I cannot find a way to share a photo and a message. The FacebookDialog.PhotoShareDialogBuilder lets you share photos from the device, but not a message, whereas the FacebookDialog.ShareDialogBuilder lets you only share a link.

What can I use instead? Should I move away from using the share dialog?

Erik
  • 11,944
  • 18
  • 87
  • 126
  • what message would that be? just let the user fill it in, it must be 100% user generated anyway. – andyrandy Mar 16 '15 at 12:42
  • As @luschn mentioned, the message must be user generated, and prefilling it would violate Facebook Platform Policy. This is why the share dialogs don't have a field for you to set it. – Ming Li Mar 16 '15 at 16:26

1 Answers1

0

You can create alert dialog and edittext within it, then you can allow user to the add their comment.

For the image , you can get the image path for the file storage and load it as a Bitmap.

Then create a bundle with above comment and image and send a post Request to the fb API with the validated and opened session.

Heshan Sandeepa
  • 3,388
  • 2
  • 35
  • 45