在与Facebook共享页面时忽略图像 [英] Ignore image when sharing a page with Facebook

查看:122
本文介绍了在与Facebook共享页面时忽略图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道通过添加元标记来分享页面时,可以让Facebook使用某种图像。但我想知道是否可以相反:告诉Facebook不要将某个图像用作一个页面的缩略图。

I know it's possible to tell Facebook to use a certain image when sharing a page by adding a meta tag. But I was wondering if the opposite is possible: telling facebook NOT to user a certain image as the thumbnail when sharing a page.

我在问这个问题,因为当我分享从我的网站的链接,它总是显示我在页脚中使用的一些图像(作为默认缩略图),这是不好:)所以我要让Facebook忽略该分享的具体图像。

I am asking this question because when I share a link from my site it always shows some image I use in the footer first (as the default thumbnail), which is bad :) so I want Facebook to ignore that specific image when sharing.

提前感谢

推荐答案

这是一个小黑客,但它对我有用。因此,Facebook用于忽略图像的唯一标准是宽高比,页面中的所有其他图像将被拾取,并将作为缩略图选项。所以我做的是将不需要的图像作为CSS标签,而不是标签。然后Facebook不会接收它们。

This is a little hackish but it worked for me. So the only criteria that facebook uses to ignore images is the width to height ratio, all other images in your page will get picked up and will be an option as a thumbnail. So what I did is expose the undesirable images as css in a div tag, instead of as an tag. Then facebook won't picked them up.

这篇关于在与Facebook共享页面时忽略图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆