Support » Plugins » [Plugin: WP e-Commerce] Facebook Like button not displaying correct image

  • I am trying to add a Facebook Like button to all of my products with the correct product image fore each. I understand almost all Facebook Like plugins allow you to set a default image for the og:image content, but I want to have a unique image for each product instead of the same image for all of them.

    I tried adding the following to the header.php file as referenced from http://yoast.com/facebook-share-wordpress/

    <?php
    global $wpsc_query;
    if ( $wpsc_query->is_single ) {
      echo '<meta property="og:title"
        content="'.wpsc_the_product_title().'" />';
      echo '<meta property="og:description"
        content="'.strip_tags(wpsc_the_product_description()).'" />';
      echo '<meta property="og:image"
        content="'.wpsc_the_product_thumbnail().'" />';
    }
    ?>

    I’ve had no luck with this however. Any help would be greatly appreciated. Not sure if this will help, but here is the beta page I am trying to fix before launching on the real site: http://beta.corpitus.com/?wpsc-product=test1

    [Code moderated as per the Forum Rules. Please use the pastebin]

  • The topic ‘[Plugin: WP e-Commerce] Facebook Like button not displaying correct image’ is closed to new replies.