Send product thumbnail on Facebook "Like"

I have added an addthis button to my sites default_template and that works well, however I would like for the thumbnail for the product to also be sent to Facebook however it doesnt appear to work when using {assign var=“detailed_href” value=“$images.detailed.image_path”} in og:image. Any help would be greatly recieved…



Thanks

I have my code in product_tabs/description.tpl and it grabs the thumbnail of the product correctly, without any custom code.

Mines just below the product name in deafult_template, maybe that’s why?

Did you get this to work in the end?

Anyone paste procedure for this please…

Mine is in default template.tpl and it grabs either the captcha code or any of the images that I have in the product details tabs, however it NEVER grabs the product image and it irritates me that I can’t get this working. Any ideas from anyone at all on how to get this done if I have this in my default_template.tpl


```php {$smarty.capture.$rating}

{assign var=“sku” value=“sku_$obj_id”}{$smarty.capture.$sku}










{assign var="old_price" value="old_price_`$obj_id`"}
{assign var="price" value="price_`$obj_id`"}
{assign var="clean_price" value="clean_price_`$obj_id`"}
{assign var="list_discount" value="list_discount_`$obj_id`"}
{assign var="discount_label" value="discount_label_`$obj_id`"} ```

Regards

I have the same problem AmitP.

I’ve implemented the code in \common_templates\product_data.tpl and in \blocks\product_tabs\description.tpl, but no matter which template I include the code in, it grabs ALL the images on the page (including banners, related products, bestsellers, and all additional product images) and shares them all and it never selects the actual product thumbnail as the default image.



Anyone have any thoughts on this?

OK, I’m a dope.

The Facebook page is displaying all the images on the page and prompts me to “Select a Thumbnail” for the share. I should have seen this - first time using FB Share functions. :smiley:

Still no fix for the product image guys? I hate it that the facebook mod is 99% perfect. Amit, can you please share with us where the problem lies exaclty? Let’s brainstorm :slight_smile:

btw, Facebook came out with a Send button too :



[url]http://developers.facebook.com/docs/reference/plugins/send/[/url]

Anyone found a way on how to get the product thumbnail on facebook? I have tried from “default_template.tpl” and from “description.tpl” with no result.



Anyone can help please?

[quote name=‘Flow’]I have my code in product_tabs/description.tpl and it grabs the thumbnail of the product correctly, without any custom code.[/QUOTE]

Flow, can you please post your code?

[quote name=‘Magpie Don’]OK, I’m a dope.

The Facebook page is displaying all the images on the page and prompts me to “Select a Thumbnail” for the share. I should have seen this - first time using FB Share functions. :D[/QUOTE]



Hi Magpie,



So which tpl file is the one needed to edit



I cannot get the like button to show if I just insert the code into product tabs\description.tpl



Please assist me if you can.



Thanks

You need to add open graph protocol. Details are here [URL]http://developers.facebook.com/docs/opengraph/[/URL]



In my index.tpl I changed the code

to

And in my meta.tpl added this meta tag


Hope this helps.

[quote name=‘breezee’]You need to add open graph protocol. Details are here [URL]http://developers.facebook.com/docs/opengraph/[/URL]



In my index.tpl I changed the code

to

And in my meta.tpl added this meta tag


Hope this helps.[/QUOTE]





Hi,



I have just done this but it doesn’t seem to be working for me? Was there anything else I needed to do for this?



The part that doesn’t work for me seems to be this: {$product.main_pair.icon.image_path} in the meta. Nothing is coming though here.

elogic,

You could check if {$product.main_pair.icon.image_path} work by viewing the page code in the browser. You could do this with Chrome Developer tools or Firefox Firebug plugin. If the {$product.main_pair.icon.image_path} changes to the correct path to your image then it works right.



I have my website domain connected to the facebook. May be you need this. To connect your domain to FB go to [url]http://www.facebook.com/insights/[/url]

Click on the Green “Insights for your website” in the popup box you will be asked for some information and given a code snippet to add to your websites Meta Tags

Something like this:





Also you could check the page here

[url]http://developers.facebook.com/tools/lint/[/url]



Good luck :slight_smile:

Thanks breezee worked for me! Another thing I added in case your description is very long:







Which will trim it to 120 chars (to the nearest word).

[quote name='breezee' timestamp='1305520495' post='112377']

You need to add open graph protocol. Details are here http://developers.fa…docs/opengraph/



In my index.tpl I changed the code

to

And in my meta.tpl added this meta tag


Hope this helps.

[/quote]



I just gave this a try, and the strangest thing is happening to me.

Some of my products are supplying the Image url (second part) while others are not.

I have tried to figure out what the products might have in common that are not supplying the image path, but since they can be of the same type in the same category I can't figure this out…



ANY help??

I've followed all the listed procedures in this topic but I cannot get my product images to show when someone “likes” a product.



I've copied the exact text into my skins/my_skin/customer/index.tpl (and the meta.tpl) files.



Is this correct? I've even refreshed my site with facebook via the facebook url debugger page.



Anyone else figure this out or can think of something I've left out?



I really need this functionality working properly…

Hi,



I added this in my index.tpl at the skin main folder ([color=#000000][font=Tahoma][size=3]/[/size][/font][/color]skins[color=#000000][font=Tahoma][size=3]/[/size][/font][/color]electro[color=#000000][font=Tahoma][size=3]/[/size][/font][/color]customer/index.tpl)




<meta property="og:image" content="{$config.http_location}{$product.main_pair.detailed.http_image_path}" />
```<br />
<br />
It's working for my website <img src="upload://rA9Qa8gnUPZzRZRdI8kt3dpjkrs.png" class="bbc_emoticon" alt=":)"> Hope I help you!

susameca,

This worked for me



I removed the “{$config.http_location}” as it was giving me double url path and now I get correct path to big image



Thank you