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
Hi Oscar
Give the following plugin a try to resolve:
https://wordpress.org/plugins/wp-open-graph/
I installed the plugin but is there anything i need to configure or is it automatic
Settings can be found under Settings > WP Open Graph. You can setup your global settings there. There are also options available on each post.
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
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.
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/.