开发者

Ignore image when sharing a page with Facebook

开发者 https://www.devze.com 2023-02-07 10:30 出处:网络
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

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.

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

Thanks in advance!


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.


I'm afraid this is not possible. Why don't you do the opposite of the opposite, and set an image to force facebook using that specific one?

So if you don't want to always set an image, make a default image to be used for facebook sharing everywhere unless otherwise specified.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号