如何告诉 Facebook 分享者忽略图片?

发布于 2025-01-02 12:37:28 字数 165 浏览 5 评论 0原文

我希望 Facebook 的 share.php 忽略页面缩略图的某些图像。

它应该像以前一样抓取我的页面(没有某个默认拇指的 og:image 元标记)。

是否有可以添加到图像或容器 div 的属性?

我不想仅仅为了共享抓取而用 JavaScript 搞砸我的页面。

I want Facebook's share.php to ignore certain images for the page thumbnail.

It should scrape my page as it does (without an og:image meta tag for a certain default thumb).

Is there an attribute I can add to the image or a container div?

I don't want to f*** up my page with javascript just for the share scraper tho.

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

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

发布评论

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

评论(1

黄昏下泛黄的笔记 2025-01-09 12:37:28

sharer.php 已弃用,不应再使用。 Facebook 可以随时彻底删除它。

例如,它使用 og 标签。只需在 html 的 head 部分指定 og:image 标签,无需使用 JavaScript 来更改图像标签:)

The sharer.php is deprecated and should no longer be used. Facebook could completely remove it at any time.

For the like, it uses og tags. Just specify the og:image tag in the head section of your html, no javascript required to change the image tag :)

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