[Plugin: WP e-Commerce] Facebook Like button not displaying correct image (1 post)

  1. scalaenterprises
    Posted 4 years ago #

    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/

    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]

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 4 years ago by scalaenterprises
  • This topic is not resolved
  • WordPress version: 3.3.1