gpt4 book ai didi

html - Google Plus 共享对话框显示错误图像,使用 OpenGraph 元标记

转载 作者:太空狗 更新时间:2023-10-29 14:14:25 25 4
gpt4 key购买 nike

我正在使用 OpenGraph 标签,因此当我在 Facebook 或 Google+ 上分享我的页面时,这些服务将知道应该在分享对话框中显示什么图像。

<meta property="og:title" content="Best Site Ever" />
<meta property="og:description" content="This website rules" />
<meta property="og:image" content="http://example.com/image.png" />

两种服务都显示正确的图像,但我更改了 og:image 中的图像(和文件名)。在通过他们的 URL 调试器运行后,只有 Facebook 显示了新图像。 Google+ 显示的是旧图片,我也通过他们的调试器运行了我的 URL,但图片不会更新。有人知道为什么吗?

最佳答案

使用the structured data tool检查谷歌正在解析的元数据/模式。此外,有时该服务正在缓存数据,请尝试在测试时将 anchor 或参数附加到您的 URL(例如 https://foo.com 变为 https://foo.com/#test1 https://foo.com?bar=1 )。缓存失效所需的时间未知,因此强制抓取工具重新计算为您的页面显示的代码段的唯一一致方法是更改​​ url。

您可能想要 try generating schema using the Google+ snippet tool .另外,请注意 article rendering has requirements that you can follow控制图像在流中的显示方式。请注意,如果您希望内容以大图像呈现,则必须为架构类型指定文章、博客或博客帖子。

关于html - Google Plus 共享对话框显示错误图像,使用 OpenGraph 元标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28957215/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com