Search code examples
facebookfacebook-graph-apifacebook-sharer

FB sharer not showing an image


Ihave a sharer FB popup window on my site. It worked, but for some time it doesn't show an image of a page. My code of the link:

<a title="Opublikuj na Facebook" onclick="window.open('http://www.facebook.com/sharer.php?s=100&amp;p[summary]=Sebastian+%C5%9Awiderski%2C+by%C5%82y+reprezentant+Polski+i+trener+Zaksy+K%C4%99dzierzyn+Ko%C5%BAle%2C+potwierdzi%C5%82+sw%C3%B3j+udzia%C5%82+w+meczu+gwiazd+dla+hospicjum.+Pojawi+si%C4%99+r%C3%B3wnie%C5%BC+Piotr+Makowski%2C+szkoleniowiec+reprezentacji...&amp;p[title]=Kolejne+gwiazdy+potwierdzaj%C4%85+sw%C3%B3j+udzia%C5%82+w+turnieju+dla+hospicjum&amp;p[url]=http%3A%2F%2Fsalps.szczecin.pl%2Findex.php%3Fcontent%3Dnews%26view%3D285937&amp;p[images][0]=http%3A%2F%2Fsalps.szczecin.pl%2Fzdjecianewsow%2F285937_1.jpg', 'sharer', 'toolbar=0,status=0,width=548,height=325');" href="javascript: void(0)"><img src="maingraphics/f_logo.png" alt="Facebook logo"></a>

What can cause, that image is not loaded? It is public and anyone can access it. Any ideas?


Solution

  • Your picture is too small, which only 100*66 pixel. The document at https://developers.facebook.com/docs/opengraph/howtos/maximizing-distribution-media-content/ stated:

    og:image – This is an image associated with your media. We suggest that you give us an image of at least 200x200 pixels. However, bigger is better, so if you have a 1500x1500 image that you can use, please give it to us. We'll downsample and crop it for for people using smaller-resolution devices but will use it on a larger device. The larger this image is, the more likely it will be used when sharing stories on Facebook. (Note: image sizes must be no more than 5MB in size.)

    I do a quick test and noticed that 200*200 pixel also got problem. So i recommend you using higher resolution picture if possible.