【发布时间】:2011-06-30 14:17:53
【问题描述】:
有了Facebook,我们有了Open Graph tags,让网站管理员可以指定故事在 Facebook 上的显示方式。
Google +1 按钮是否有类似的东西,允许网站管理员指定缩略图、描述和标题? Google+ 似乎忽略了og-meta tags。
【问题讨论】:
标签: facebook-like google-plus-one schema.org og-meta
有了Facebook,我们有了Open Graph tags,让网站管理员可以指定故事在 Facebook 上的显示方式。
Google +1 按钮是否有类似的东西,允许网站管理员指定缩略图、描述和标题? Google+ 似乎忽略了og-meta tags。
【问题讨论】:
标签: facebook-like google-plus-one schema.org og-meta
从 Google+ 帮助文档中,我们现在有了一个官方答案。
Google 使用 schema.org 微数据在搜索(和 Google+)中生成丰富的 sn-ps。在这两个链接中有很多关于 schema.org 以及它与 Facebook OpenGraph 的关系的文章:
见:http://www.google.com/support/webmasters/bin/answer.py?answer=1211158 见:https://developers.google.com/+/plugins/+1button/
一些重要的部分:
+片段
+1 页面后,用户可以选择将页面分享给 Google+ 通过显示的分享气泡。这股泡沫(随着 与生成的 Google+ 活动帖子)包括预览,或 +Snippet,包含页面标题、页面简要说明和缩略图。这些数据是从 以四种方式之一的目标 URL 的内容,按顺序列出 优先级:
Schema.org 微数据(推荐)
如果页面使用 schema.org 微数据进行注释,则 +Snippet 将使用
name、image和description属性 任何 schema.org 类型。
<body itemscope itemtype="http://schema.org/Product">
<h1 itemprop="name">Shiny Trinket</h1>
<img itemprop="image" src="image-url"></img>
<p itemprop="description">Shiny trinkets are shiny.</p>
</body>
开放图协议
如果页面包含标题、图像和 描述,然后它们将用于 +Snippet。
<meta property="og:title" content="..."/>
<meta property="og:image" content="..."/>
<meta property="og:description" content="..."/>
元“标题”和“描述”标签
如果页面的元素包含并且 标签,+Snippet 将使用他们的 标题和描述的内容属性,分别。为了 缩略图,共享框将尝试找到合适的 页面上的图像。
<meta name="title" content="..." />
<meta name="description" content="..." />
【讨论】:
如果我在 Google+ 中分享到我们的 web 应用 (restorm.com) 的链接,那么标题、描述和图片取自各自的 og: 标签(og:title、og:description、og:image)。
这些标签
<title>One Shot Orchestra • Electronic • Music, Concerts & More • restorm.com</title>
<link href="https://restorm.com/favicon.ico?116a158" rel="shortcut icon" />
<meta name="description" content="Listen to music of One Shot Orchestra for free and browse the Artist's news, events, videos, pictures, shop, booking & press Infos, live footage & much more on restorm." />
<meta property="og:title" content="One Shot Orchestra" />
<meta property="og:url" content="https://one-shot-orchestra.restorm.com/" />
<meta property="og:type" content="band" />
<meta property="og:description" content="Bangin´ Live Electro aus Bern-Kreuzberg" />
<meta property="og:site_name" content="restorm.com" />
<meta property="fb:app_id" content="127577323959237" />
<meta property="og:language" content="en" />
<meta property="og:image" content="https://assets3.restorm.com/resources/images/40/40b17a53aa9785fa89c15b06b9fcfd72_643969.jpeg?116a158" />
<meta property="og:video" content="https://one-shot-orchestra.restorm.com/minipage/minipage.swf?applicationSettingsURL=https%3A%2F%2Fone-shot-orchestra.restorm.com%2Fminipage%2Fsettings.xml&auto=true" />
<meta property="og:video:width" content="300" />
<meta property="og:video:height" content="200" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
最终被这样分享
所以标题和描述肯定取自og:title和og:description,而不是取自标题和描述元标记...
【讨论】:
即使使用 schema.org 微数据或 Open Graph 标记明确引用,图像也不会包含在 +Snippet 中。具体来说,高度必须至少为 120px,如果宽度小于 100px,则纵横比不得大于 3.0。
【讨论】:
刚刚在另一个帖子Google +1 Generated Thumbmail in Profile上回答了这个问题
看起来 Google+1 具有以下数据层次结构:
希望这会有所帮助。
【讨论】:
我正在处理这个问题,但 Google+ 没有提取我的 OG 标签。
当我将:<body itemscope itemtype="http://schema.org/Article"> 放入 HTML 时,它开始接收它们。
希望这可以节省一些时间!
【讨论】:
meta og:image 有效,秘诀是图像足够大。它在 140x112 失败,当我更改为更大的缩略图 511x364 时工作
【讨论】:
Google 似乎在标准元标记中使用页面的标题和说明。但是,它似乎无法指定缩略图。
【讨论】: