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

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

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

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. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 10 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    Hi Oscar

    Give the following plugin a try to resolve:

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

  2. 10 years, 8 months ago oscar dejongh

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

  3. 10 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    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. 10 years, 8 months ago oscar dejongh

    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. 10 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    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. 10 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    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.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More