简体   繁体   中英

Description not shown in Facebook ShareDialog

I am trying the ShareLinkContent using the ShareDialog from Facebook in my Android App. Following is the code snippet I have used. I have the content title and the description as it is needed for the post. It is fine while is show in the mobile while I try to post it.But When I see the post in the facebook it is different. Hope it is picking it from the google play store.

Please help to resolve this s that I can see the description and the tilte that I have set it in the share dialog

@Override
public void facebookShare(String msg) {
    if (ShareDialog.canShow(ShareLinkContent.class)) {
        ShareLinkContent linkContent = new ShareLinkContent.Builder()
                .setContentUrl(Uri.parse("https://play.google.com/store/apps/details?id=memory.game.collection.free"))
                .setImageUrl(Uri.parse("http://i67.tinypic.com/svl2qt.png"))
                .setContentTitle("Test ContentTitle")
                .setContentDescription("Test content Description")
                .build();

        shareDialog.show(linkContent);
    }

}

While Posting from Mobile Device

在此输入图像描述

The Post shared in Facebook

在此输入图像描述

Facebook's publish_actions permissions reference states that it's not allowed to:

Pre-fill the user message parameter with any content the user didn't enter themselves, even if they can edit or delete that content before sharing. This applies to posts, comments, photo captions, and photo album captions.

I guess they decided to block the title and description parameters.

Though it is delayed answer. I have been through this recently and found out that it is not possible, even if its possible by any means, its not with Facebook Platform Policy . And specifically this policy .

Even when you do go to declaration, I got this

/** * Sets the user generated caption for the photo. Note that the 'caption' must come from * the user, as pre-filled content is forbidden by the Platform Policies (2.3). * * @param caption {@link java.lang.String} of a {@link com.facebook.share.model.SharePhoto} * @return The builder. */

  public Builder setCaption(@Nullable final String caption) { this.caption = caption; return this; } 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM