hi there, I'd like to have widgets (facebook, pinit, tweet) for sharing images and content for each product on my site. When a developer has tried to do this, it seems to grab the wrong image from new products section instead of the image on the page (even where there is one product per page). Has anyone successfully done this on their site? Many thanks, Sue
Announcement
Collapse
No announcement yet.
Image Sharer for Social Media
Collapse
X
-
Welcome to the Community, Sue.
Do you have a link to a faulty page so we can see what's wrong there?Norman - www.drillpine.biz
Edinburgh, U K / Bitez, Turkey
-
link
Hi Norman
This is the link to the TEST site. http://REMOVEtest.genesistechnical.c...Owl--1256.html
as you can see the image grabbed is of a horse not the owl!
It's actinic business plus v.11
I am really hoping someone can solve this!
Many thanks & Kind regards,
Sue Foley
www.eoco.org.uk
Admin - added text to break the link above to deter search robots. REMOVE the relevant word from the link to visit the page.
Comment
-
I have done this coding for a website. You can define which page image is used for AddThis sharing for Pinterest, you need to add a CSS class to the image i.e. "imageclass" then add a configuration Javascript above the buttons code i.e.:
Code:<script type="text/javascript"> var addthis_config = { image_include: "imageclass" } </script>
And other general topics related to other sharing sites and the API are here: AddThis - Third Party Buttons.
Comment
-
The open graph tag alone doesn't seem to pick it up for some reason, however you can add the HTML5 tag <figure> and </figure> around the image and it picks it up correctly. Solution from here.
Comment
-
I've been trying to add the <figure> tags around the product <img> tag but still not seeing anything different. I've also changed the !DOCTYPE to <!DOCTYPE html>, although I'm not sure how that may affect the rest of the site.
Uploaded at: http://goo.gl/m0PTuw
Louise - Did you use AddThis or code from another source?
Comment
-
Using Open Graph tags with AddThis and figure tags seemed to work. Here are the Open Graph tags for the header of a product page. The blockif pagetype is "Product Page" thanks to Norman who posted the code from here. If you are using the code for different pages you would need to adjust the blockif and content code.
Code:<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Product%20Page%22"> <meta property="og:title" content="<actinic:variable name="ProductName" />" /> <meta property="og:image" content="<actinic:variable name="CatalogURL" encoding="perl" selectable="false" /><actinic:variable name="ProductImageFileName" />" /> <meta property="og:description" content="<actinic:variable name="ProductDescription" />" /> <meta property="og:url" content="<actinic:block php="true">echo '<actinic:variable name="CatalogURL" encoding="perl" selectable="false" />' . basename('<actinic:variable name="ProductPageName" encoding="perl" selectable="false" />');</actinic:block>" /> </actinic:block>
1) If you use Open Graph image tag and Pinterest's Javascript, Pinterest uses the Open Graph as the primary image tag and needs the variable catalogurl to create an absolute URL, otherwise it does not grab the single image or Pinterest shows a broken image.
2) If you leave out the Open Graph description tag it should automatically pick up the meta description tag.
Comment
-
I have added the AddThis code including the og tags and the figure tags and it does appear to work - at least most times, not every time, but most times at least.
I have a feeling that the page info is cached by Facebook but can't be sure. Anyway certainly headway made. Thanks again Louise.
Example here: http://goo.gl/ik0G21
Comment
-
Originally posted by peblaco View PostI have done this coding for a website. You can define which page image is used for AddThis sharing for Pinterest, you need to add a CSS class to the image i.e. "imageclass" then add a configuration Javascript above the buttons code i.e.:
Code:<script type="text/javascript"> var addthis_config = { image_include: "imageclass" } </script>
And other general topics related to other sharing sites and the API are here: AddThis - Third Party Buttons.
How to create a CSS class and what code is in it and where ?
http://www.videoson.fr/acatalog/audi...sation2ex.html
I'm so sorry..."LABOR IMPROBUS OMNIA VINCIT"
Comment
Comment