Ignore image when sharing a page with Facebook

大憨熊 提交于 2019-11-28 04:30:08

问题


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 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.

Thanks in advance!


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/4810564/ignore-image-when-sharing-a-page-with-facebook

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!