Is it possible to customize / change the description content of a fb-share button?

╄→尐↘猪︶ㄣ 提交于 2019-12-12 02:39:56

问题


This is my code, it's from Facebook, it's quite simple:

<div class="fb-share-button" data-href="http://www.mysite.com/" data-type="button_count"></div>

But when I click on the share button, I found that I can't control the description content of the website. Some other sites did but I don't know how they did it.

Is it possible to change it?

Thanks


回答1:


Facebook Has complete instruction and the available properties you can add on The Open Graph protocol site

The basic meta tags are

<meta property="og:title" content="{My Title}" />
<meta property="og:type" content="{Site Type}" />
<meta property="og:url" content="http://example.com" />
<meta property="og:image" content="http://example.com/images/og_image.jpg" />

And there's more options if you want to add them




回答2:


no you can't. You control the content with og metatags. If you want to provide a different description, you need to post via app, with the share dialogue: https://www.facebook.com/dialogue/feed?app_id=APP_ID&link=YOUR_LINK&description=YOUR DESCRIPTION&picture=A_PICTURE_URL&name=SITE TITLE&caption=BEST THINGS EVER etc etc



来源:https://stackoverflow.com/questions/20672180/is-it-possible-to-customize-change-the-description-content-of-a-fb-share-butto

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