开发者

facebook or digg sharing, how does it know which part of the story to use as the short summary?

开发者 https://www.devze.com 2023-01-02 01:21 出处:网络
If I am trying to make my site sharable through digg and facebook, can i hard开发者_StackOverflow社区 set which section of the page will be used as the short description? thanksFor Facebook you\'ll ne

If I am trying to make my site sharable through digg and facebook, can i hard开发者_StackOverflow社区 set which section of the page will be used as the short description? thanks


For Facebook you'll need to use the "share button". This can be customised, but will always be something simple like this:

<a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share</a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>

The Facebook developers wiki states that the short description it publishes will be taken from the "description" meta tag in the head of the page. Likewise, Facebook will respect meta tags for "title", which will override the tag, and a link tag for an image. The example they give is:

<meta name="title" content="Smith hails 'unique' Wable legacy" />
<meta name="description" content="John Smith claims beautiful football is the main legacy of Akhil Wable's decade at the club. " />
<link rel="image_src" href="http://www.onjd.com/design05/images/PH2/WableAFC205.jpg" />

Be sure to check out the wiki page for details of how to specify media such as video and audio.

As for Digg, I've never worked with it, but I'd assume that it would be similar to Facebook. At the very least, I would expect it to comply with the and tags.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号