问题
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