skip to Main Content

I tried sharing an Image with Caption on Facebook with the help of Facebook API and the code as below:

SharePhoto photo = new SharePhoto.Builder()
                    .setBitmap(image)
                    .setCaption("Caption is Important")
                    .build();
            SharePhotoContent content = new SharePhotoContent.Builder()
                    .addPhoto(photo)
                    .build();

            shareDialog.show(content);

It open up the ShareDialog but the caption wont appear in it the dialog

2

Answers


  1. Chosen as BEST ANSWER

    As per the facebook documentation shared CBroe:

    https://developers.facebook.com/policy#control

    According to its policy 2.3 it states that

    Don't prefill captions, comments, messages, or the user message parameter of posts with content a person or business didn’t create, even if the person can edit or remove the content before sharing. You may use our Share Dialogs to prefill a single hashtag in a post, but don't prefill any content a person or business didn't create via the API.

    So we are no longer allowed to pre-fill captions for images by using shareDialog or by using any other method.


  2. You can add caption with the given method. But at share dialog of facebook. You have to manually type your caption.enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search