谷歌+片段缩略图未显示

发布于 2024-12-07 20:50:06 字数 634 浏览 0 评论 0原文

我在我的网站中有 google+ 片段,为了在 google+ 上分享我的网站,我的代码看起来像这样,

<head>
<meta property="og:title" content="title of website" />
<meta property="og:url" content="my website url" />
<meta property="og:image" content="url image" />
<meta property="og:description" content="description of my website" /> 
</head>

<bod>
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<g:plusone size="tall"></g:plusone></td>
</body>

我还包含了类似 facebook 的内容,它呈现所有元标签(标题、图像、描述)。但是,如果是 google+,则不会显示缩略图。

需要帮助!

i have in google+ snippet in my website, to sharing my website on google+, my code look like this

<head>
<meta property="og:title" content="title of website" />
<meta property="og:url" content="my website url" />
<meta property="og:image" content="url image" />
<meta property="og:description" content="description of my website" /> 
</head>

<bod>
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<g:plusone size="tall"></g:plusone></td>
</body>

i have also included facebook like, which rendering all meta tags (title,image,description). But, in case of google+, thumbnail image is not showing.

Need help !!

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

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

发布评论

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

评论(2

淡淡的优雅 2024-12-14 20:50:06

您的图像的尺寸是多少?我将缩略图标准化为 100x67,因为它们在 Facebook 上看起来很正确,但 Google+ 没有显示它们。我发现较大的图像可以使用相同的代码,因此我只能假设 Google+ 由于某种原因忽略了小图像。

What are the dimensions of your image? I standardised my thumbnails at 100x67 as they look right on Facebook, but Google+ wasn't showing them. I found that larger images will work with the same code, so I can only assume Google+ ignores little images for some reason.

剑心龙吟 2024-12-14 20:50:06

来自 google+ 文档:https://developers.google.com/+/web/snippet/

太小或不够方形的图像不包含在
+片段,即使图像由 schema.org 微数据或开放图谱标记明确引用。具体来说,高度必须为
至少 120px,如果宽度小于 100px,则长宽比
比率不得大于 3.0。

然而我一直在尝试,这似乎并不完全正确。有谁知道正确的算法吗?

from google+ docs: https://developers.google.com/+/web/snippet/

Images that are too small or not square enough are not included in the
+Snippet, even if the images are explicitly referenced by schema.org microdata or Open Graph markup. Specifically, the height must be at
least 120px, and if the width is less than 100px, then the aspect
ratio must be no greater than 3.0.

However i've been experimenting and this does not seem to be exactly right. Does anyone know the correct algorithm?

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