Description not shown in Facebook ShareDialog

℡╲_俬逩灬. 提交于 2020-01-11 06:39:55

问题


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


回答1:


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.




回答2:


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;
    }


来源:https://stackoverflow.com/questions/33716721/description-not-shown-in-facebook-sharedialog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!