开发者

Facebook share doesn't show images

I code a news PHP script. End of each news I have a Facebook share button. The problem is I can't display thumbnail images with Facebook share.

I tried Meta OG

<link rel="image_src" href="" /&g开发者_运维问答t; 

element without any success. Interesting thing is, some of the domains which is using my news PHP Script, has no problem with it but some has.

Domain without any problems:

  • http://www.yenialanya.com/manset/vergi-denetmenine-itiraz.htm (please check the bottom of the news)

Domains with problems:

  • http://www.usakhabermerkezi.com/egitim-ogretim/usak-universitesi-rektorluk-secimleri-sonuclandi-iste-secim-sonuclari.htm
  • http://www.demokrathaber.net/dunya/dunyanin-ekseni-kaydi.htm
  • http://www.tebilisim.com/v4/siyaset/benzin-zamlardan-bizde-hosnut-degiliz.htm

I also tried addThis and it didn't solve the problem.

All of the domain names above are using the same system. I thought it might be because of the system so I tried clean HTML page:

  • http://www.phpsistem.com/fb/

As you can see in the last example, I used 2 different kind of sharing options. First with popup. I sent all parameters over URL but some domains display images, some don't. I also added addThis option.

I also thought about .htaccess and cleaned everything in it since I thought .htaccess might block something. I took every step very carefully which I could think of.

This issue started to be annoying, I would be glad if anyone could help me out.


Use Open Graph protocol

<meta property="og:title" content="The Rock"/>
<meta property="og:type" content="movie"/>
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
<meta property="og:site_name" content="IMDb"/>
<meta property="fb:admins" content="USER_ID"/>
<meta property="og:description"
      content="A group of U.S. Marines, under command of
               a renegade general, take over Alcatraz and
               threaten San Francisco Bay with biological
               weapons."/>

To test each links use URL Linter


Look at this forum, most of them will ask same questions, why OG image is not working on like button. It's a bug maybe? Bug 16580


Are you using a public server or a local one? Facebook share doesn't show pictures if the URLs are coming from localhost.


Facebook seems to want images that are at least 200px in both directions, whether supplied in the OG metadata, or just embedded on the page. They have updated their URL linter to show this error for the OG metadata recently. I can't find sources now, but I thought they used to have a maximum pixel dimension of less than 200px previously...

Also, I've seen problems displaying thumbnail images for Chrome on OS X, where on Windows browsers there is no problem. Really strange.


Go to http://developers.facebook.com/tools/debug and fill in your url

If the Responscode is 503 then your website is not accessible. It could be that your website is under construction…

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜