18

I have some example url that provide for facebook sharing. But the image inside the url page does not show on facebook comment box. I have already inserted Meta tag like this

<meta property="fb:app_id" content="xxxx"/>
<meta property="og:site_name" content="xxxx"/>
<meta property="og:title" content="xxxx" />
<meta property="og:description" content="xxx" />
<meta property="og:type" content="xxx:photo">
<meta property="og:url" content="http://www.example.com/content/xxx"/>
<meta property="og:image" content="http://www.example.com/images/xxx.png"/>

*And my image is 1000*1000 px(width*height).

Any idea for solve?

Pascal Rosin
  • 1,498
  • 16
  • 27
Mojiiz
  • 7,898
  • 6
  • 26
  • 25

6 Answers6

57

Your meta tag should look like this:

<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>

And it has to be placed on the page you want to share (this is unclear in your question).

If you have shared the page before the image (or the meta tag) was present, then it is possible, that facebook has the page in its "memory" without an image. In this case simply enter the URL of your page in the debug tool http://developers.facebook.com/tools/debug. After that, the image should be present when the page is shared the next time.

Pascal Rosin
  • 1,498
  • 16
  • 27
  • 2
    Thank you for your answer. I have already solved this problem. My image size is too big. When I resized the image as 600*600, the thumbnail is quickly show on the facebook. – Mojiiz Jan 11 '12 at 09:42
  • I added 600X600 size image still its not showing in fb dialogue box. – RN Kushwaha Mar 24 '15 at 13:31
  • @Pascal, how about if I don't have access to the page? I am just sharing affiliate link but it is not showing the images anymore. It used to until a couple of months ago. Thanks. – WowBow Jul 24 '15 at 06:08
  • 1
    Side note, images cannot be too small. FB dev page says: Use images that are at least 1200 x 630 pixels for the best display on high resolution devices. – Evers Oct 15 '15 at 19:29
  • I have added the og:image tag, the image is a 75x75pixels image still it is not showing. In other pages of my website, though there is no such tag, still fb is able to recognize the image and it shows in the share link. What can be the problem sir? – Dibyanshu Jaiswal Apr 08 '16 at 06:32
  • For me image is not showing even though it shows in the debugger i am using 400x300 image dimension. I i have zero error in FB debugger. not sure why image is not showing – Learning Apr 21 '20 at 05:39
  • Another weird cause is if you have underscore in the image's filename. Spent hours to discover this so if will help others here it is. – Alex Jul 26 '22 at 12:05
11

The issue is with the facebook cache and solution is to refresh the facebook cache by going to the link. https://developers.facebook.com/tools/debug/og/object/

and pressing the button "Fetch New Scrape information".

Hope it helps

winhowes
  • 7,845
  • 5
  • 28
  • 39
Guru
  • 111
  • 1
  • 2
2

I found out that the image that you are specify with the og:image, has to actually be present in the HTML page inside an image tag.

the thumbnail appeared for me only after i added an image tag for the image. it was commented out. but worked.

Rakesh
  • 1,336
  • 2
  • 11
  • 13
  • 2
    I've never had this issue, I'm sure it was more a configuration problem (on your side), it got fixed but you were still looking at cached data. There's NO need to place an tag. – emerino Apr 14 '15 at 21:17
  • adding the image with `display:none` or `width:0` did not help. the sharer had the og:image, if in the html or not, but only after 2nd or 3rd try – haheute Jun 23 '16 at 10:51
0

My site faces same issue too.

Using Facebook debug tool is no help at all. Fetch new data but not IMAGE CACHE.

I forced facebook to clear IMAGE CACHE by add www. into image url. In your case is remove www. and config web server redirect.

 add/remove www. in image url should solve the problem
minhhq
  • 444
  • 5
  • 9
0

The answers above are good and they should fix most of the problems you have. But to see the errors directly from facebook you can use the link https://developers.facebook.com/tools/debug/sharing/

that way you're sure of the steps you need to take.

I found out the URL for the og:image meta has to be an absolute url

wale A
  • 81
  • 1
  • 7
0

I ran into this and while I had the og:image (and others), I was missing og:url and og:type, so I added those and then it worked.

<meta property="og:url" content="<? 
 $url = 'https://' . $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'];; 
echo htmlentities($url,ENT_QUOTES); ?>"/> 

twiddly
  • 11
  • 7