This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Facebook show the wrong image when sharing a product how do fix this?

11 years ago · Last reply by Andrew Misplon 11 years ago

when i attempt to share a product facebook shows the wrong image. I went to the facebook debug and found this https://developers.facebook.com/tools/debug/og/object?q=www.sofinos.com. It says
Warnings That Should Be Fixed
Inferred Property The ‘og:url’ property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property The ‘og:title’ property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property The ‘og:image’ property should be explicitly provided, even if a value can be inferred from other tags.

Now I found this code in another forum

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().'" />'; 
}

it says to add it to my header.php file ot sure how to do this and if possible would rather add it to my custom css section through backend of wordpress

URL: http://www.sofinos.com

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

6
  1. Andrew Misplon Staff 11 years, 3 months ago

    Hi Oscar

    Give the following plugin a try to resolve:

    https://wordpress.org/plugins/wp-open-graph/

  2. oscar dejongh 11 years, 3 months ago

    I installed the plugin but is there anything i need to configure or is it automatic

  3. Andrew Misplon Staff 11 years, 3 months ago

    Settings can be found under Settings > WP Open Graph. You can setup your global settings there. There are also options available on each post.

  4. oscar dejongh 11 years, 3 months ago

    how do iset these setting up i am kinda of lost here i was able to access the setting page but not sure how to set these up

  5. Andrew Misplon Staff 11 years, 3 months ago

    Wherever it says image url like default image url, you can grab the image you want displayed in a Facebook share by going to your Media Library, clicking on the image and copying the URL from the right column box.

    On each post below the editor you’ll get more specific options, just for that post.

  6. Andrew Misplon Staff 11 years, 3 months ago

    Alternatively, install a plugin called WordPress SEO which has a section for this. The following tutorial goes over the use of that part of the WordPress SEO plugin: http://www.wpbeginner.com/wp-themes/how-to-add-facebook-open-graph-meta-data-in-wordpress-themes/.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread