Revenant
Revenant

Reputation: 2984

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="" /> 

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:

Domains with problems:

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:

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.

Upvotes: 5

Views: 28946

Answers (4)

Joep
Joep

Reputation: 112

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…

Upvotes: 0

contrebis
contrebis

Reputation: 1318

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.

Upvotes: 1

haha
haha

Reputation: 1532

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

Upvotes: 16

Naveed Ahmad
Naveed Ahmad

Reputation: 3175

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

Upvotes: 1

Related Questions