facebook 或 digg 分享,它如何知道故事的哪一部分用作简短摘要?

发布于 2024-09-03 01:51:57 字数 64 浏览 6 评论 0原文

如果我试图使我的网站可通过 digg 和 facebook 共享,我可以硬设置页面的哪个部分将用作简短描述吗?谢谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

静水深流 2024-09-10 01:51:57

对于 Facebook,您需要使用“分享按钮”。这可以定制,但总是像这样简单:

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

Facebook 开发者 wiki 声明它发布的简短描述将从页面头部的“description”元标记中获取。同样,Facebook 将尊重“标题”的元标记(这将覆盖该标记)以及图像的链接标记。他们给出的例子是:

<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" />

一定要查看wiki 页面有关如何指定视频和音频等媒体的详细信息。

至于 Digg,我从未使用过它,但我认为它会类似于 Facebook。至少,我希望它符合 和 标签。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文