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.
If you can't see photos on Facebook and you're seeing black boxes, empty boxes or broken images instead: Check if you have images turned on in your Facebook data usage settings. Check if you have images enabled in your phone's mobile web browser settings.
Tap in the top right of Facebook. Scroll down and tap Settings. Scroll down to Audience and visibility section and tap the option you want to change the privacy for. For other things you share on Facebook, you can select the audience before you share.
Check the Size and Format of Your Photo Also, make sure your photo is in one of the following file formats: BMP, GIF, IFF,PSD, TIF, WEBP, WBMP, PNG, JPG and JPEG. Also, you can try toggling an option in the Facebook app to see if that helps fix the can't upload pictures to Facebook problem.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With