View Single Post
  #30  
Old June 22nd, 2012, 03:21 AM
andrewjg andrewjg is offline
 
Join Date: Jun 2012
Posts: 43
Default

Thanks Eric, definitely getting there!

When I click "Like" on a Category page, no image shows in Facebook. And when I click "Like" on a Product page, it uses my header as the image (which is far too wide).

Is it possible to make the code pick one of the product's images off the page and push that to Facebook?

I was going to replace ".image" with ".thumbnail", to see what happens...

Quote:
<meta property="og:image" content="http://<?php echo $_SERVER['HTTP_HOST']; ?>[product.image tag='0']" />
...but the new code you provided me doesn't seem to reference ".image":

Quote:
<div class="fb-like" data-href="<?php echo datafeedr_tools()->current_url(true); ?>" data-send="true" data-width="450" data-show-faces="true" data-font="arial"></div>
Quote:
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Failing that, on my website (as opposed to my Store which is set up as a sub-domain), I use this code...

Quote:
<meta property="og:image" content="http://www.cheap-computing.com/cheap-computing-fb.jpg" />
...to pull in this image...



...when the Like button is used. And it's the right size for Facebook.

But ideally it would grab a product image instead. Is this possible?

Thanks

Last edited by andrewjg : June 22nd, 2012 at 03:28 AM.