VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => VirtueMart Extensions Directory => Topic started by: kevinwood on March 31, 2011, 16:09:14 pm

Title: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on March 31, 2011, 16:09:14 pm
Having received some requests for a tutorial on how to use VM Open Graph to get the Facebook Like button working in Virtuemart, I have written one.  I hope you find it helpful.

Please visit it here:
http://www.bigskyphotography.ca/design/tutorial-facebook-like-virtuemart/ (http://www.bigskyphotography.ca/design/tutorial-facebook-like-virtuemart/)

If you have any comments or questions about this tutorial, please post them below.

Thank you.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: thanoss43 on March 31, 2011, 22:46:23 pm
Hi Kevin,

Thanks for your tutorial and your pluggins.

I have a problem with joomfish.

I am in English Language and i press like for a product. I have 1 like.

Then I change the language to Greek and go to the same product. I have 0 likes. I called some friends and told them to "like" a specific product, using the English language of my site. Now I have 7 likes for the product when in English language and 0 when viewing the same products in Greek.

Do you have any suggestions?

Thanks
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on April 01, 2011, 00:43:40 am
Can you post a link to your site?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on April 01, 2011, 16:38:48 pm
Okay, I learn something new every day, which is excellent.  Joomfish, and presumably most other multi-language support extensions, changes the base URL to reflect different languages.  So in your example your base URL for English will be:
www.mysite/en/index.php...
and your base URL for Greek will be:
www.mysite/el/index.php...

I have to think about this some more to determine what the best solution is.

In the meanwhile, I recommend not using the Add Canonical plugin.  Instead, you could use the og:url tag to point to a single language.  This will cause your English Likes to show up on the Greek URLs and vice-versa.  

I have attached a modified version of the plugin that will add the og:url tag which will point all of your Greek pages to the English version.  If you prefer it the other way around just reverse the languages on lines 155 and 156.

This version can also be used by anyone else looking for multi-language support with minimal changes.  

Anyway, let me know if you have any problems with this.


[edit: attachment removed.  functionality is now included in the plugin]
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: thisispipe on April 02, 2011, 11:42:26 am
Kevin,

Your post is useful to me, however after I click "like", a red error occur stating that the facebook could not reach my page.

I read a related post, in order to set up XFBML version, do we need to add something that called Javascript SDK to our pages?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on April 02, 2011, 13:34:09 pm
Is your site accessible from the Internet?  Facebook needs to be able to be able to access the page that has the like button on it.

If you are sure that this is not the problem, please post a link to your site so that I can take a look.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: thisispipe on April 04, 2011, 07:45:38 am
Yes, I'm certain that my website can be accessed from the internet. It would be great if you can look at my page as now I still could not find the problem. Please note that the website is not in English but you should be able to find the Facebook button easily.

http://mytowelhouse.com/index.php?page=shop.product_details&product_id=21&flypage=flypage.pbv.v1.tpl&pop=0&option=com_virtuemart&Itemid=58
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on April 04, 2011, 18:57:10 pm
I think that the problem appears to be that the Add Canonical plugin is pointing to a different browse page template (flypage.tpl) than the one you are actually using (flypage.pbv.v1.tpl), and the template pointed to doesn't have the Like button on it.

The way that the Add Canonical plugin determines which browse page template to include in its URL is by looking for the first published category that the product is in and selecting the template associated with it.  Please take a look at your categories that contain this product and see if "flypage.tpl" is set for any of them and if so, try changing them to "flypage.pbv.v1.tpl" instead and let me know if that works.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: thisispipe on April 05, 2011, 05:08:04 am
Thanks for your quick response.

From what you have suggested, I looked at two spots I could think of(please see screen-shot attachment).
1. At a specific setting of each product category
2. Global setting, at a tab "Site"

The FB button still shows a red error after clicking. Any more suggestion to this problem Kevin?

Thanks again

[attachment cleanup by admin]
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on April 05, 2011, 14:04:10 pm
Your page source still shows the canonical link pointing to flypage.tpl:

Code: [Select]
<link href="http://mytowelhouse.com/index.php?page=shop.product_details&product_id=21&flypage=flypage.tpl&option=com_virtuemart&Itemid=58" rel="canonical"  />

Check the product page in VM configuration and see what other categories the product belongs to, and check which template those categories are set to use.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: m.davide82 on April 06, 2011, 10:12:16 am
Everything ok with VM, but now I have another problem...

I'm using it for all the articles.. and the plugin doesn't take the right image but another one in the site.

How can I take the first image on the article?
How can I insert the link tag in each article?


Thanks a lot in advance,

David
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: nflmerch on April 06, 2011, 22:15:04 pm
thanks kevinwood, good tutorial. It worked right away, but it seems to load very slow.  for example:
http://nflmerch.com/index.php?page=shop.product_details&category_id=18&flypage=flypage.tpl&product_id=2032&option=com_virtuemart&Itemid=160
Does it do that for everyone else or just me?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on April 07, 2011, 00:40:22 am
Seems fine to me.  I have noticed that there is occasionally a noticeable delay between the majority of the page loading and then the actual Like button appearing, but it is not a significant delay.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: nflmerch on April 07, 2011, 22:40:53 pm
I'm getting sometimes a 10 second delay on newly browsed pages. When I refresh the same page it must be cached because then it appears right away. I don't believe it's my connection because i have a high speed T1, but I should test it outside the local network. It's good to know that the facebook like is not inherantly slow. I also thought it was perhaps the new IE9 browser, but google chrome does the same thing for me.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on April 08, 2011, 01:58:06 am
You do have quite a lot of products on your site.  Can you determine whether it is the facebook code or the plugins that are causing the delay?  Try disabling the two plugins one at a time and viewing new pages and see which element is slowing you down.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: nflmerch on April 08, 2011, 23:03:29 pm
I disabled the plugins one at a time and it's slow either way. I agree that it could be the large amount of products. I now noticed the facebook link on other websites is slow too, for instance a news article on http://host.madison.com/wsj . It loads the same way as my site: few second delay, then the page content jumps up a second after the image loads. Perhaps this IS the nature of the beast! Thanks for your help
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on April 09, 2011, 00:52:22 am
The other option is to see if the iFrame version is faster than the XFBML version.  If it is, it is possible to make the iFrame version work the same; it'll just take a bit more work.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: nickon2 on April 10, 2011, 01:55:02 am
Having a strange problem with opengraph
When the plugin is enabled that the index page does not work
The rest of the pages work OK and th og: tags are there
What could be wroong
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on April 10, 2011, 19:20:48 pm
Please define "does not work".
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: nickon2 on April 10, 2011, 19:31:26 pm
Yes you are right. Does not work does not say mutch  :P
What I mean is that I get a blank page. Note that this does not happen on any other page.
Just the main index page. I tried looking at the source and Just don't see anything I is like there is no page at all.
I tried a different theme (just in case it was a theme issue) but it is not.
Note that I firs saw it after I installed the VM Add Canonical plugin but I am not sure if this has anything to do with it. I uninstalled VM Add Canonical plugin but have the same problem. As long as VM Open Graph plugin is enabled I have this problem. When I disable it all is OK. I also tried diff settings on the plugin but still nothing


Kind regards
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on April 11, 2011, 14:20:25 pm
That is a truly strange problem.  I have never heard of it happening before.  Try going into the VM Open Graph config and changing "add tags to all pages" to 'No'.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: nickon2 on April 11, 2011, 14:49:20 pm
I have tried every possilbe option. Nothing changes.
Send you an pm
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on April 13, 2011, 14:46:38 pm
I have now released v1.7 which adds beta multi-lingual support.

Please read the updated tutorial for more information on using this feature before enabling it.

I have tested this functionality as best I can on a Joomfish test site, but as I do not have a production multi-language site, I can not guarantee that it will perform as you might expect it to.  I would be very interested to hear back from anyone who decides to use it and let me know what their experience is like.
Title: Error
Post by: strophe on May 09, 2011, 12:32:53 pm
Hi!
First of all, thanks for this plugin!!

I have an error on this website: http://www.lesfeesconfiot.com/index.php/boutique/confitures?page=shop.product_details&flypage=flypage.tpl&product_id=37&category_id=1

When you click 'I like' it give a red link "Erreur" which open a popup say "La page à l’adresse http://www.lesfeesconfiot.com/index.php/boutique/confitures?page=shop.product_details&amp;flypage=flypage.tpl&amp;product_id=53&amp;category_id=1 n’est pas accessible."

and when sometime it's possible (most of the time it's not possible)to leave a comment (with the red error in the back), on Facebook you can see only the link, no images nothing else...

Have you an idea?

Thank you.

Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on May 09, 2011, 14:06:28 pm
I have heard that this problem occurs when you have "enable cookie check" checked off in the Virtuemart configuration settings.  Try unchecking it and see if that clears the error.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: strophe on May 09, 2011, 14:22:58 pm
I have heard that this problem occurs when you have "enable cookie check" checked off in the Virtuemart configuration settings.  Try unchecking it and see if that clears the error.
Thank you for your answer.
Hélas, cent fois hélas... no it's doesn't work when I uncheck it... still same problem.
Facebook can't acces to the page, and nothing but the link is posted on facebook.


EDIT: I just desactived the plugin, and.... all is working good now... the button is in french, and on facebook we can see the product picture etc. very very strange...
any ideas?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: tcelica2000 on May 12, 2011, 22:52:20 pm
Hi to all , sorry to bother, I have followed your tips , item by item, after 1 day i get it to "work" but isnt fully working, when i click i like botom, it says that i kike that, but error apears by side, when click the word error, a popup from facebook says:
La página de http://www.xxxxx.com/business/mastshop/shopping-virtual?page=shop.product_details&amp;product_id=38&amp;flypage=flypage.tpl cant be reached, i think that is because is to long, what do you think I need to do in order this to work?? Thanks in advance!
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on May 13, 2011, 14:44:17 pm
Have you made sure that "enable cookie check" is UNCHECKED in the Virtuemart configuration?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: tcelica2000 on May 13, 2011, 17:26:33 pm
Yes I unchecked because it wasnt working, and y read that i have to uncheck that option "enable cookie check" because facebook didnt use cookies or something like that, after I Unchecked that, start working, but appears that error message, like the url is too long... I dont know what can I do in order to repair that error. Thanks for your help!
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: Ventsi Genchev on May 13, 2011, 18:00:24 pm
I want to thank Kevinwood for great tutorial.

But I met with the plugin the following problem:
When the user is in an inside page and then enters in his/her account, it doesn't stay on the same page, where he/she was. The web-site forwards the user to a web-page, which says, that he is already in the registered users part.
Furthermore, I don't want the description of products in Facebook to use $product_s_desc.

Having tried several different plugins, I decided that there must be an easier way to add buttons.

So here's an easy way to add buttons like "Like" and "Send":

flypage.tpl.php

Code: [Select]
<?php
$doc 
=& JFactory::getDocument();
$current_url JURI::getInstance();
$current_url_string = ($current_url->toString() );

$doc->addCustomTag'<meta property="og:title" content="' $product_name '"/>' ); // product name
$doc->addCustomTag'<meta property="og:type" content="product"/>' ); // type of products
$doc->addCustomTag'<meta property="og:url" content="' $current_url_string '"/>' ); // product page
// get product image START
$db->setQuery("SELECT product_thumb_image FROM #__vm_product WHERE product_id  = " $product_id );
$db->query();
$image $db->loadResult();

if ( $image ) {
$imgurl JURI::base() . "components/com_virtuemart/shop_image/product/" $image;
$doc->addCustomTag'<meta property="og:image" content="' $imgurl '"/>' );
}
// get product image END
$sitename $mainframe->getCfg('sitename');  //get site name
$doc->addCustomTag'<meta property="og:site_name" content="' $sitename '"/>' );  //or what you want
$doc->addCustomTag'<meta property="fb:admins" content="XXXXXXXXXXXXXXXXXXX"/>' ); // from facebook!
$doc->addCustomTag'<meta property="og:description" content="' $product_s_desc '"/>' ); //or what you want
?>

<div id="fb-root"></div>
<!-- appId=XXXXXXXXXXXXXXXX is your application ID from Facebook! -->
<script src="http://connect.facebook.net/en_US/all.js#appId=XXXXXXXXXXXXXXXX&amp;xfbml=1"></script><fb:like send="true" width="490" show_faces="false" font="arial"></fb:like>

You can see how some of the products look at www.vspc.bg

Best regards
Venci
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: tcelica2000 on May 13, 2011, 22:04:01 pm
It says error on line 28, its about image capture something like wring syntax, I remove the ime thing, and the code works, but i have the same problem, keeps saying error, because it is unreachable by facebook:

The page http://www.openxxxx.com/mastshop/mastshop/Servidores/MacBook-Pro-MB133LL/A/flypage.tpl.html cant be reachable

i see that mastshop is in the address 2 times, but really in my browser it is only 1 time, i think this is the wrong thing, but i dont know where to remove one of the /mastshop

Thanks to all who could help me out!
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on May 14, 2011, 12:21:33 pm
Well, I can't get to the URL either.  Is this a test server that you are working on?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: arepie on June 03, 2011, 07:17:40 am
hello, i have read the tutorial at "http://www.bigskyphotography.ca/design/tutorial-facebook-like-virtuemart/" and followed everything just like it says. Unfortunately, the like button generates an "error".
im not sure what i've been missing. I have been at this at least 4 hours finding the solution, but found none. I hope anyone could help me. Thanks.

p/s: this is my link http://www.j4ufashion.com/3rd-party-extensions/virtuemart/details/27/lg-art-flower-washing.html?pop=0
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: sammeans on June 03, 2011, 07:31:15 am
Quick question, hoping you can help out here..

I just added this on two separate Virtuemart installations. It works like a dream on the first one, but on the second, it only works until you select an attribute (size) and then the like button disappears. Please follow the link below to see it in action.. as you choose a t-shirt size, you will see its nowhere to be found.. even the twitter button dies and turns into a text-only link. So weird and incredibly frustrating!

PLEASE HELP!

Example:
http://hellomerch.com/sh/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=938&category_id=49&option=com_virtuemart&Itemid=2

And here's a link to it working perfectly on a separate installation.
http://hellomerch.com/shop/index.php?option=com_virtuemart&page=shop.product_details&flypage=neonflypage.tpl&Itemid=57&category_id=65&product_id=1632

THANKS!
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on June 03, 2011, 14:16:47 pm
hello, i have read the tutorial at "http://www.bigskyphotography.ca/design/tutorial-facebook-like-virtuemart/" and followed everything just like it says. Unfortunately, the like button generates an "error".
im not sure what i've been missing. I have been at this at least 4 hours finding the solution, but found none. I hope anyone could help me. Thanks.

p/s: this is my link http://www.j4ufashion.com/3rd-party-extensions/virtuemart/details/27/lg-art-flower-washing.html?pop=0

Hi.  I just tried your site and it seems to work perfectly for me.  The only issue I see is that your og:site_name tag is set to a blank string (you can change that in the VM Open Graph config), but otherwise it seems fine.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on June 03, 2011, 14:20:39 pm
Quick question, hoping you can help out here..

I just added this on two separate Virtuemart installations. It works like a dream on the first one, but on the second, it only works until you select an attribute (size) and then the like button disappears. Please follow the link below to see it in action.. as you choose a t-shirt size, you will see its nowhere to be found.. even the twitter button dies and turns into a text-only link. So weird and incredibly frustrating!

PLEASE HELP!

Example:
http://hellomerch.com/sh/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=938&category_id=49&option=com_virtuemart&Itemid=2

And here's a link to it working perfectly on a separate installation.
http://hellomerch.com/shop/index.php?option=com_virtuemart&page=shop.product_details&flypage=neonflypage.tpl&Itemid=57&category_id=65&product_id=1632

THANKS!

Hi there.  I went to the site you gave as an example and I can't recreate your problem.  When I select an option from the attribute list, the Like and Tweet buttons are still there. 
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: spottedsparrow on June 04, 2011, 20:35:42 pm
Great tutorial! Thanks very much.

Is there a way to specify which image it pulls from the page? I have several images for each product and would like the main image to be posted to Facebook. Right now it's pulling the last image from the product or no image at all.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on June 06, 2011, 14:15:18 pm
Do you have VM Open Graph enabled?  The whole point of the plugin is to tell Facebook to use the main image.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: zainabubu on June 06, 2011, 14:19:03 pm
hello I was able to get the facebook like working according to your instructions, but when I also installed Simple FanpageBox: http://greek8.com/index.php?option=com_content&view=article&id=1&Itemid=3
the "like" on my page disappeared. But when I disabled the FanPageBox, the "like" re-appeared. Is there a way I can get both working together?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: spottedsparrow on June 06, 2011, 14:26:16 pm
Thanks for your reply, Kevin. VM Open Graph is installed and enabled with the following settings.

Site Name Over-ride: blank
Title: use product name
Open Graph Type: blank
Facebook Admins: [my fb id]
Add the og:url tag?: yes
Enable BETA Multi-Language Support (Note! Mouse-over for important information?: no
Method used for multi-languages?: folder
Target language?: blank
Set tags for all pages?: yes

This is the code in my flypage.tpl.php file.
Code: [Select]
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=178058812248154&amp;xfbml=1"></script><fb:like send="true" width="450" show_faces="false" font="verdana"></fb:like>
Most of the time I'm getting no image at all on Facebook.

[attachment cleanup by admin]
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on June 06, 2011, 19:36:38 pm
Thanks for your reply, Kevin. VM Open Graph is installed and enabled with the following settings.

Most of the time I'm getting no image at all on Facebook.

I took a look at your site, and see that the og:image tag is messed up.  As an example:
Code: [Select]
<meta property="og:image" content="http://www.spottedsparrow.com/components/com_virtuemart/shop_image/product/http://spottedsparrow.com/images/products/fishing_thumb.jpg"/>
It looks like you have moved your product images out of the default Virtuemart folder, and have changed the product_thumb_image field in your database to point directly to the image URL rather than just to a file name.  To get the plugin working with your modifications is easy.  In vmopengraph.php, just change line 126 from:
Code: [Select]
$imgurl = JURI::base() . "components/com_virtuemart/shop_image/product/" . $image;to:
Code: [Select]
$imgurl = $image;
Kevin
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on June 06, 2011, 19:40:20 pm
hello I was able to get the facebook like working according to your instructions, but when I also installed Simple FanpageBox: http://greek8.com/index.php?option=com_content&view=article&id=1&Itemid=3
the "like" on my page disappeared. But when I disabled the FanPageBox, the "like" re-appeared. Is there a way I can get both working together?

Hi there.  I am not familiar with FanPageBox, but this doesn't sound like your issue is related to my plugin or tutorial.  I would direct your question to the FanPageBox author.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: joomlacreative on June 08, 2011, 08:32:50 am
What can I say is thank you soooooo much!  It is what I was looking for:)
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: spottedsparrow on June 08, 2011, 08:37:32 am
Thanks again, Kevin. It's now working on my site. You're a star!
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on June 08, 2011, 14:28:01 pm
What can I say is thank you soooooo much!  It is what I was looking for:)

You're welcome and thanks for dropping by to comment!

Thanks again, Kevin. It's now working on my site. You're a star!

Great to hear it's working for you! 
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: Bremzy on June 10, 2011, 22:11:29 pm
Hi i have read the tutorial at "http://www.bigskyphotography.ca/design/tutorial-facebook-like-virtuemart/" and followed everything just like it says. Unfortunately, the like button generates an "error". (The page at http://jojkaligrafija.si/index.php?option=com_virtuemart&Itemid=9 could not be reached because the server returned status code 303.)

im not sure what i've been missing. I have been at this at least 4 hours finding the solution, but found none. I hope anyone could help me. Thanks.

p/s: this is my link http://jojkaligrafija.si/index.php?option=com_virtuemart&Itemid=9
Best regards Bremzy
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on June 13, 2011, 19:00:39 pm
Hi i have read the tutorial at "http://www.bigskyphotography.ca/design/tutorial-facebook-like-virtuemart/" and followed everything just like it says. Unfortunately, the like button generates an "error". (The page at http://jojkaligrafija.si/index.php?option=com_virtuemart&Itemid=9 could not be reached because the server returned status code 303.)

im not sure what i've been missing. I have been at this at least 4 hours finding the solution, but found none. I hope anyone could help me. Thanks.

p/s: this is my link http://jojkaligrafija.si/index.php?option=com_virtuemart&Itemid=9
Best regards Bremzy

Hi there.  I just went to your site and tested the Like button.  It seems to work perfectly for me; are you still getting errors?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: Bremzy on June 14, 2011, 11:23:05 am
Hi.
No anymore.
Works for me too. Thank you for your concern and great plugin.
Best regards Bremzy
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: miloidrr on June 16, 2011, 04:55:35 am
Hi Kevin tks for the great tutorial, but in my site http://www.tiendarockstar.com/guitarras-de-coleccion-a-escala/58-bajo-de-coleccion-en-miniatura-beatles-yellow-submarine.html it does not work, i´ve testing all but Ican´t do it could you check my site and review source font to see thah all is ok. Tks Kevin a lot
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: miloidrr on June 16, 2011, 05:01:52 am
kevin it works, Ive unselected Enable the Cookie Check? option and it works. Tks a lot
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: miloidrr on June 16, 2011, 05:24:51 am
Important, if you are useng SH404SEF extention you must check show id in URL option, without this option it does not work
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: badrelmers on June 18, 2011, 00:49:27 am
sorry but this doesnt work completly,i spent all the day ,i mean:
-the button is not translated when i change the language.
-the like points is not acumulated ,every language has a separated number of likes (that s because the og:url doesn t appear in the page i have only "og:site_name"
"fb:admins" and "og:type" , i have all the options "Add the og:url tag?   " "Enable BETA Multi-Language Support" activated in the plugin ), i have installed VM Add Canonical but this one doesn t work too ( i don t know why ),then i installed http://www.bretteleben.de/lang-en/joomla/canonical-url-modul.html but nothing ( canonical work but the likes are not acumulated).
but whene i installed "Ultimate Facebook Like Content Button " the translation of like button is done (only works with a plugin that they have called fblike_plg_we_Facebook_JSDK_FBML_v1.3.zip).

i can t gave a link because i m in localhost
is there anything to do please
thanks
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on June 18, 2011, 14:06:48 pm
Well, you'll never get the Like button to work properly running localhost because it requires that Facebook be able to connect to your site.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: tartartar on June 27, 2011, 17:15:06 pm
Hello and thank you in advance for the help

i installed the open graph plug in and set it but id doesn't work

one product page:


i put this into my flypage.tpl  :

 <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=1480723553&amp;xfbml=1"></script><fb:like send="false" layout="button_count" width="500" show_faces="true" colorscheme="dark" font="verdana"></fb:like>


the appId i put is my administrator's profile (random number / correct number of digits)

not all of my images are in the same folder

Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on June 27, 2011, 21:12:47 pm
Hi there.  I think I have fixed the bug in vmopengraph that is causing you problems.  It is only affecting you because you have your joomla installed into a subdirectory. 

Could you please try out the attached version and let me know if it fixes your error?  Thanks.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: tartartar on June 29, 2011, 23:05:44 pm
Hello friend and thank you for your effort!

no unfortunately,

i am logged in as the administrator (same id as the parameter on opengraph), nothings shows on the wall and the like button does not seem viewed.

I think the problem is these meta names facebook developers opengraph suggest:

 
Code: [Select]
  <title>The Rock (1996)</title>
    <meta property="og:title" content="The Rock"/>
    <meta property="og:type" content="movie"/>
    <meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
    <meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
    <meta property="og:site_name" content="IMDb"/>
    <meta property="fb:admins" content="USER_ID"/>
    <meta property="og:description"
          content="A group of U.S. Marines, under command of
                   a renegade general, take over Alcatraz and
                   threaten San Francisco Bay with biological
                   weapons."/>


i don't know where to paste it and use them, on the flypage or the main index?


what is more i have selected google friendly links on the site. is it confused by that?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: tartartar on June 29, 2011, 23:11:47 pm
oh man i dont know what i should add to flypage.tpl to understand my meta names,
i installed the new version though
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: nflmerch on June 29, 2011, 23:28:29 pm
I posted a while ago about my Like button showing up slow on my site.  I just wanted to post back and let everyone know that it works much faster lately.
I'm certain I haven't changed anything so it's probably on Facebook's end.  Good news.
Thanks again
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: tartartar on June 29, 2011, 23:44:19 pm
MY BROTHER IT FINALLY WORKS WITH THE NEW VERSION!!!

i really love you now! i dont touch it now.. :P
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: bobby_38 on June 30, 2011, 05:38:11 am
Thank work good on virtuemart 1.1.4 , need to disable the cookie check

Cheers!
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on June 30, 2011, 14:11:58 pm
MY BROTHER IT FINALLY WORKS WITH THE NEW VERSION!!!

i really love you now! i dont touch it now.. :P

Fantastic!  I'm glad to hear it is working for you now.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: goasutlor on July 04, 2011, 06:35:52 am
Hi Kevinwood ,


First i must to say big thanks for your plugin but  i still have problem after i installed yout plugin about "error" when i press Like
Please try to survey my web at www.99closet.com in product pages such as

http://www.99closet.com/index.php/component/virtuemart/?page=shop.product_details&flypage=flypage.tpl&product_id=54&category_id=13

 (http://www.99closet.com/index.php/component/virtuemart/?page=shop.product_details&flypage=flypage.tpl&product_id=54&category_id=13)

below is error from my page

(http://www.99closet.com/images/error/1.jpg)

My parameter
(http://www.99closet.com/images/error/2.jpg)

(http://www.99closet.com/images/error/3.jpg)


This is my flypage.tpl.php

Code: [Select]
<?php if( !defined'_VALID_MOS' ) && !defined'_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
mm_showMyFileName(__FILE__);
 
?>


<?php echo $buttons_header // The PDF, Email and Print buttons ?>

<?php
if( $this->get_cfg'showPathway' )) {
echo "<div class=\"pathway\">$navigation_pathway</div>";
}
if( 
$this->get_cfg'product_navigation')) {
if( !empty( $previous_product )) {
echo '<a class="previous_page" href="'.$previous_product_url.'">'.shopMakeHtmlSafe($previous_product['product_name']).'</a>';
}
if( !empty( $next_product )) {
echo '<a class="next_page" href="'.$next_product_url.'">'.shopMakeHtmlSafe($next_product['product_name']).'</a>';
}
}
?>

<br style="clear:both;" />
<table border="0" style="width: 100%;">
  <tbody>
<tr>
<?php  if( $this->get_cfg('showManufacturerLink') ) { $rowspan 5; } else { $rowspan 4; } ?>
  <td width="33%" rowspan="<?php echo $rowspan?>" valign="top"><br/>
  <?php echo $product_image ?><br/><br/><?php echo $this->vmlistAdditionalImages$product_id$images ?></td>
  <td rowspan="1" colspan="2">
  <h1><?php echo $product_name ?> <?php echo $edit_link ?></h1>
  </td>
</tr>
<?php if( $this->get_cfg('showManufacturerLink')) { ?>
<tr>
  <td rowspan="1" colspan="2"><?php echo $manufacturer_link ?><br /></td>
</tr>
<?php ?>
<tr>
      <td width="33%" valign="top" align="left">
      <?php echo $product_price_lbl ?>
      <?php echo $product_price ?><br /></td>
      <td valign="top"><?php echo $product_packaging ?><br /></td>
</tr>
<tr>
  <td colspan="2"><?php echo $ask_seller ?></td>
</tr>
<tr>
  <td rowspan="1" colspan="2"><hr />
  <?php echo $product_description ?><br/>
  <span style="font-style: italic;"><?php echo $file_list ?></span>
  </td>
</tr>
<tr>
  <td><?php 
  
if( $this->get_cfg'showAvailability' )) {
   echo $product_availability
   }
   ?>
<br />
  </td>
  <td colspan="2"><br /><?php echo $addtocart ?></td>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=184732911584191&amp;xfbml=1"></script><fb:like send="true" width="450" show_faces="false" font=""></fb:like>
</tr>
<tr>
  <td colspan="3"><?php echo $product_type ?></td>
</tr>
<tr>
  <td colspan="3"><hr /><?php echo $product_reviews ?></td>
</tr>
<tr>
  <td colspan="3"><?php echo $product_reviewform ?><br /></td>
</tr>
<tr>
  <td colspan="3"><?php echo $related_products ?><br />
   </td>
</tr>
<?php if( $this->get_cfg('showVendorLink')) { ?>
<tr>
  <td colspan="3"><div style="text-align: center;"><?php echo $vendor_link ?><br /></div><br /></td>
</tr>
<?php  ?>
  </tbody>
</table>
<?php 
if( !empty( $recent_products )) { ?>

<div class="vmRecent">
<?php echo $recent_products?>
</div>
<?php 
}
if( !empty( 
$navigation_childlist )) { ?>

<?php echo $VM_LANG->_('PHPSHOP_MORE_CATEGORIES'?><br />
<?php echo $navigation_childlist ?><br style="clear:both"/>
<?php 
?>

Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: goasutlor on July 04, 2011, 12:52:54 pm
Now it work fine for me but it have a little bit problem about link in facebook page.
In facebook page can show true picture but wrong link such as

http://www.99closet.com/virtuemart?page=shop.product_details&product_id=39&flypage=flypage.tpl&option=com_virtuemart&Itemid=64

But the true link is

http://www.99closet.com/index.php?page=shop.product_details&product_id=39&flypage=flypage.tpl&option=com_virtuemart&Itemid=64


Please suggest me to correct it.

Thanks in advance.

KO
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on July 04, 2011, 14:19:40 pm
What version of vm open graph are you using?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: goasutlor on July 04, 2011, 18:14:12 pm
plg_vmopengraph_1.8
plg_vmaddcanonical_1.2
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on July 04, 2011, 19:08:26 pm
Hmmm.... weird.  This is a new one on me.  You appear to have Joomla SEF turned on, but without URL re-writing, is that correct?  What other extensions do you have installed?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: goasutlor on July 05, 2011, 04:24:07 am
After i installed " TagMeta1.3Community " i will face the problem.. But now i've uninstall this mod so it still have problem
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on July 06, 2011, 14:08:36 pm
Please try VM Open Graph 1.9 and see if that makes any difference.  I had uploaded it to JoomlaCode a week or so ago but forgot to tick the "released" option.  You can get it here:
http://joomlacode.org/gf/project/vmopengraph/frs/ (http://joomlacode.org/gf/project/vmopengraph/frs/)

Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: goasutlor on July 06, 2011, 17:24:20 pm
Still have same problem after i installed new version of your plugin


http://www.99closet.com/virtuemart?page=shop.product_details&product_id=39&flypage=flypage.tpl&option=com_virtuemart&Itemid=64

But the true link is

http://www.99closet.com/index.php?page=shop.product_details&product_id=39&flypage=flypage.tpl&option=com_virtuemart&Itemid=64

But when I try to checl Enable the Cookie Check? It will be the true link but it will have "error" behine " like this"
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on July 06, 2011, 20:49:29 pm
Well, I just went to your store again and it seems to be working perfectly.  What did you do to fix it?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: goasutlor on July 07, 2011, 06:21:38 am
it doesn't work for me but i want to say thank you  for your nice support. Now i remove this tag from my pages already.

Thanks.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on July 07, 2011, 14:14:33 pm
Well, as I said I just tried it on your site yesterday and it worked perfectly!
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on July 12, 2011, 14:05:54 pm
Yeah, that's a weird one.  Have you tried unchecking the "browser cookie check"?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on July 12, 2011, 18:14:46 pm
I just tried about 5 of your products and it worked fine on 4 of them (including the one you posted above) but failed on 1.  However, I can't see any reason why that one product failed.  It doesn't produce any sort of error message.

This is the one that failed:
[link removed by request]

Try one thing for me... in the VM Open Graph config, disable the "og:url" tag and then try it again.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on July 12, 2011, 22:30:11 pm
Hi Kevin, thanks , I disabled it , what "the og:url tag" is for?

I also moved the script little up.

Can you please check it from your side?

Thank you very much.

The og:url tag tells FB what the canonical URL for the product page should be.  It's redundant if you already have a rel-canonical tag.

Anyway, I've figured out what the problem is with your site.  When I view the site with Chrome, I can see that for those pages where it wasn't working before, the "Like" button changes to a "Confirm" button when clicked, and then when you click on the confirm button it tries to open a pop-up window asking you to confirm the Like.  If you do so, it works properly and posts the item to your wall.  Apparently this is some security feature that Facebook added to try to prevent clickjacking.  For whatever reason, Facebook thinks that your site may be spammy and so it tries to pop up this window on some of your pages.

Of course, it fails if you have a popup blocker turned on (which almost everyone does!).  Even worse, the 'confirm' button seems to be hidden more often than not (I only see it in Chrome but not in Firefox)  In fact, there is a long thread of complaints about this from other sites on the Facebook developer site:
http://forum.developers.facebook.net/viewtopic.php?id=93201&p=1

So the "good" news is that your site is configured properly and the plugins are working properly.  The bad news is that there doesn't appear to be a solution.  Since most of your pages do not appear affected, I would recommend leaving well enough alone and hopefully Facebook will figure out what your site isn't spammy and will stop requiring this confirmation.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: galaxy on July 12, 2011, 23:39:39 pm
Kevin, thank you very much for your help and instructions.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: fokyip on July 27, 2011, 18:58:13 pm
Hi Kevin, I'm trying to figure out why it's giving me a facebook error I have

System - VM Open Graph 1.9
System - VM Add Canonical 1.2
I went to virtue mart and unchecked Enable the Cookie Check?

I enabled and disable Canonical neither works

The link is
http://hb.lookmatters.net/bracelet-collection/detail/2-bracelet-collection/flypage/2-1aw11bb?sef=hcfp

I read for this forum and instructions I don't know what else to do?

Thank you in advance.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on July 27, 2011, 20:02:05 pm
Hi Kevin, I'm trying to figure out why it's giving me a facebook error I have

System - VM Open Graph 1.9
System - VM Add Canonical 1.2
I went to virtue mart and unchecked Enable the Cookie Check?

I enabled and disable Canonical neither works

The link is
http://hb.lookmatters.net/bracelet-collection/detail/2-bracelet-collection/flypage/2-1aw11bb?sef=hcfp

I read for this forum and instructions I don't know what else to do?

Thank you in advance.

When you go to the link you have posted and click Like it returns "error", as you noted.  What you may not have realized is that the word "error" is actually a link that provides some further information.  In this case, it says:

The app ID "153750941361536" specified within the "fb:app_id" meta tag was invalid.

You don't actually have an "fb:app_id" meta tag, but you do have an "fb:admins" meta tag with that value.  Please double check that "153750941361536" really is your Facebook ID.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: fokyip on July 27, 2011, 22:23:25 pm
I entered the admin id in the plugin so I don't know why is referring to app_id. The admin id that is used on a module on the front page for facebook friends http://hb.lookmatters.net/ which seems like the ID is correct. Though in my fly page i see a appid when I went to the facebook developers page in there but it's not referring to the admin id and I changed it to the code to website you had for an example demo but its still encountering problems.

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=100570196709475&amp;xfbml=1"></script><fb:like send="true" width="450" show_faces="true" font=""></fb:like>

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like send="true" width="450" show_faces="true" font=""></fb:like>
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: Reggaeshop on July 28, 2011, 10:32:00 am
Hello,

I am encountering the same problem as the writer before, However, for me it sometimes does, sometimes does not give an error:
- it most of the time gives the error when I access a product from the small 1-pic slideshow module on the right
- in case there error appears and I refresh the page and click again on like, the error does not appear and the like post is added to my FB profile
- when I access the products by first clicking on the category list on the left and then randomly at a product, no error appears
- when I access the products from the "last product" list below, it shows the error, after refreshing it does not any more when clicking on "Like"

In FB Lint, the error mesage is teh same as for the previous post: It says "You put 1855482553649 in the fb:admins field. It should be in fb:app_id" - but I am quite sure I did not do so.

Only at the first try of the LIKe button after installing, it showed the picture (the right one, the thumbnail), at all later attempts not any more.

- I carefully read this forum thread to the end
- installed using your tutorial at Bigskyphotography
- installed VM Opengraph 1.9
- installed VM Add  Canonical 1.2
- unchecked Cookie check.
- the site: www.reggaeshop.cz

I spent a lot of time on this. The main issue is the error - the pics I see as a secondary thing.

Thanks for your help,

Peter
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: Reggaeshop on July 28, 2011, 10:55:17 am
One more thing - the pic I seem to have solved with your (Kevin's) advise regarding not using the default thumbnail location... let's see if this stays OK ...
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on July 28, 2011, 13:58:58 pm
I entered the admin id in the plugin so I don't know why is referring to app_id. The admin id that is used on a module on the front page for facebook friends http://hb.lookmatters.net/ which seems like the ID is correct. Though in my fly page i see a appid when I went to the facebook developers page in there but it's not referring to the admin id and I changed it to the code to website you had for an example demo but its still encountering problems.


It appears to be working fine now.  I just tried it and had no errors.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on July 28, 2011, 14:09:03 pm
In FB Lint, the error mesage is teh same as for the previous post: It says "You put 1855482553649 in the fb:admins field. It should be in fb:app_id" - but I am quite sure I did not do so.

It looks like Facebook recently made some changes to how they deal with fb:admins vs fb:app_id.  Let me look into it and I'll get back to you shortly.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on July 28, 2011, 14:31:03 pm
Trenchtown... please try removing the "appId=165541816838769" from your Facebook like code and see if that fixes the issue.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: Reggaeshop on July 28, 2011, 15:00:02 pm
Hi Kevin, thanks for replying so quickly.

From the code  what exactly I have to delate? /all.js#appId=165541816838769&amp;xfbml=1">   

All between # and &amp, or a bit more?

Thanks,

Peter
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on July 28, 2011, 15:20:26 pm
Just between the # and & should do it.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: Reggaeshop on July 28, 2011, 15:47:28 pm
:( Still the same. I cleared cache and cookies, tried it again (select a pic form the 1-pic slide show, click "like"), and the error appeared again.

However, when doing this for a second and third time, it went OK.

When I cleared Cache/cookies again, and repeated the action (select a pic form the 1-pic slide show, click "like"), the error appeared again....
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: Michele Rocco on July 31, 2011, 01:57:04 am
Hi, I need help if you can.

I have installed the plugin and put the fb code in flypage, the Send and Like button works right but they always take the last additional pic of my products.
I looked the og:img tag and it have the right pic url inside so I don't understand why FB is taking the last additional pic of my products and not the right first image.

What could be?

Thanks, michele
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on August 05, 2011, 14:19:02 pm
Hi, I need help if you can.

I have installed the plugin and put the fb code in flypage, the Send and Like button works right but they always take the last additional pic of my products.
I looked the og:img tag and it have the right pic url inside so I don't understand why FB is taking the last additional pic of my products and not the right first image.

What could be?

Thanks, michele

Can you post a link to one of your pages?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on August 05, 2011, 14:25:08 pm
:( Still the same. I cleared cache and cookies, tried it again (select a pic form the 1-pic slide show, click "like"), and the error appeared again.

However, when doing this for a second and third time, it went OK.

When I cleared Cache/cookies again, and repeated the action (select a pic form the 1-pic slide show, click "like"), the error appeared again....

Trenchtown, can you check to see if "1855482553649" is your Facebook user ID?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: Reggaeshop on August 07, 2011, 09:49:28 am
Hi, it looks like that there could be the issue. Since I had selected a "readible" name for facebook profile (www.facebook.com/myname), my ID is not visible by hovering over my name with the  mouse.

To find my FB userID, I used the method via hovering with my mouse over pictures I stored - however, this method appears not to function any more.

Ways to find your FB userID are described here:
- http://blog.panzigdesigns.com/2011/07/finding-your-facebook-profile-user-id.html (useful for anybody who needs
- http://www.metataggenerator.org/analyzer/just-fb-id.php
I tried both, plus a FB app which shows your ID, and they all give the same result (which is different than the one I have added to the code so far).

I guess I have to add my real FB userID to the FB Like code I added to my site. Will try this and let you know the results.

Thanks so far!
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: Reggaeshop on August 07, 2011, 10:10:48 am
Well, I do not know what should be next steps.

As advised earlier, I removed the appID from the code. But I do not know what to do with my FB userID?  Where to put it?

Thanks,

Peter

Already found out - there is one field in the OpenGraph extension where to add the admin ID. I tested it, and it looks like that the issue is solved - the likes very neatly appear on my facebook profile when I test it (including picture  :)  ) and no error messages any more.

I hope no new issues appear - so far thanks a lot!!!
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: marksiii on August 08, 2011, 14:16:31 pm
I have installed sh404sef (jomla 1.5.23, vm1.1.9, vm open graph 1.9, vm add canonical 1.2, sh404sef 2.2.7.981)
Like button not working  :(

When sh404sef is disabled, all works fine.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on August 08, 2011, 14:18:06 pm

Already found out - there is one field in the OpenGraph extension where to add the admin ID. I tested it, and it looks like that the issue is solved - the likes very neatly appear on my facebook profile when I test it (including picture  :)  ) and no error messages any more.

I hope no new issues appear - so far thanks a lot!!!

Excellent!  Glad to hear you got it working!
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on August 08, 2011, 14:19:14 pm
I have installed sh404sef (jomla 1.5.23, vm1.1.9, vm open graph 1.9, vm add canonical 1.2, sh404sef 2.2.7.981)
Like button not working  :(

When sh404sef is disabled, all works fine.

HI there.  I need a bit more information than that.  What do you mean the like button doesn't work?  Do you get an error?  Have you tried the Facebook linter?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: marksiii on August 08, 2011, 15:10:02 pm
www shows:
Be the first of your friends to like this. · Error (red color)

Lintner shows:
The page at could not be reached because the server returned status code 303.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on August 08, 2011, 17:33:23 pm
www shows:
Be the first of your friends to like this. · Error (red color)

Lintner shows:
The page at could not be reached because the server returned status code 303.

Well, it doesn't sound like it has anything to do with my plugins.  Have you tried unchecking the "cookie check" option in VM?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: marksiii on August 08, 2011, 23:32:41 pm
Unchecking the "cookie check" in VM solve the problem.

Thank you for your help  :)
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: bOngY on August 26, 2011, 02:41:16 am
Hi Kevin Thank you so much 8) ;D
It works like a charm, I did have to bang my head a few times to get it to work properly

For new people
Do exactly as said in the tutorial and disable the virtuemart check cookie
Also to avoid having the complete URL pasted on the facebook, when you are configuring the plugin select og:URL tag to No so that the title is displayed with a hyper link to the same URL.

Again Thanks Kevin U Rock :)
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: ilcarlo72 on September 05, 2011, 15:45:37 pm
Hello!

I've followed your tutorial and I got my like button working fine: on site side is shows like count and on facebook side it shows the right image, title and link... There is only one issue: in place of the product description it shows the site description.

Any workaround for this?

Thanks in advance and regards,
Carlo
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on September 06, 2011, 14:46:52 pm
Hello!

I've followed your tutorial and I got my like button working fine: on site side is shows like count and on facebook side it shows the right image, title and link... There is only one issue: in place of the product description it shows the site description.

Any workaround for this?

Thanks in advance and regards,
Carlo

Hi Carlo.  Facebook pulls the description from the meta description tag in the header.   Virtuemart willl populate the meta description tag with the contents of the "short description" field in the product page.  If you do not enter anything in this field, then Joomla will populate this tag with the default meta description in your site configuration.  You do not want this to happen because from an SEO point of view, search engines see multiple duplicate meta descriptions which will negatively impact your search results.  Therefore, for both SEO and Facebook purposes you should be filling in the short description field for each of your products in Virtuemart.

Hope that helps.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: nickwalks on September 12, 2011, 09:15:53 am
Hi Kevin,

Thanks for the development of this plugin. I have it close to working but I'm just not sure what I'm missing to get it over the line. My problem is that I see different amount of "likes" for same product.

http://www.creuxcycling.com/t-shirts?page=shop.product_details&flypage=flypage_creux_tees.tpl&product_id=2&category_id=1 (4 people like this)
http://www.creuxcycling.com/t-shirts?page=shop.product_details&category_id=1&flypage=flypage_creux_tees.tpl&product_id=2 (be the first to like)

Can you point me in the right direction to get this resolved? Thanks in advance,
Nick
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on September 12, 2011, 14:39:24 pm
Hi Kevin,

Thanks for the development of this plugin. I have it close to working but I'm just not sure what I'm missing to get it over the line. My problem is that I see different amount of "likes" for same product.

http://www.creuxcycling.com/t-shirts?page=shop.product_details&flypage=flypage_creux_tees.tpl&product_id=2&category_id=1 (4 people like this)
http://www.creuxcycling.com/t-shirts?page=shop.product_details&category_id=1&flypage=flypage_creux_tees.tpl&product_id=2 (be the first to like)

Can you point me in the right direction to get this resolved? Thanks in advance,
Nick

Liking across different URLs with the same canonical URL sometimes has odd results, but usually running the various URLs through the Facebook Linter solves them.  In this case it didn't.  The only thing I can see as a problem is that you don't have the og:type tag set which may be causing this issue.  I would recommend setting the og:type to "product" then running the URLs through the Linter to see if that fixes it.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: nickwalks on September 13, 2011, 04:04:50 am
Hi again Kevin, I did as you suggested. Firstly I set the og:type to "product" and ran the urls through the facebook linter. It gave the error that no admin id was set. So I went back through https://developers.facebook.com/docs/reference/plugins/like/ Step 2 - Get Open Graph Tags and because I was logged in to facebook (in another window) it automatically had my admin id in place. I entered this in the 'System - VM Open Graph' plugin Facebook Admins field. Also I updated the html tag of the template by adding in xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://ogp.me/ns#" which I'd left out previously. It seems to have resolved and be working now. Thanks for the push in the right direction.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: Gippsweb on October 11, 2011, 01:28:46 am
Thanks for this plugin. It's been working a treat on our site.. :)

Although when testing links at http://developers.facebook.com/tools/debug it says that og:locale should be explicitly provided.
It shows as a warning that should be fixed as opposed to an error..

Is there a way to do this through the plugin in some way??
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on October 12, 2011, 18:07:58 pm
Thanks for this plugin. It's been working a treat on our site.. :)

Although when testing links at http://developers.facebook.com/tools/debug it says that og:locale should be explicitly provided.
It shows as a warning that should be fixed as opposed to an error..

Is there a way to do this through the plugin in some way??


Hi there.  Thanks for the heads up.  It appears that Facebook is finally introducing internationalization to open graph:
https://developers.facebook.com/docs/beta/opengraph/internationalization/

At this point the addition of the og:locale tag is optional and I don't think it is a good idea to have the plugin put it in until it can be done right.  It is not clear to me from the FB documentation how it might work with existing Joomla multi-language extensions such as JoomFish.  I'd want to work with a JoomFish user to see how it fits together.

Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: filterit on October 19, 2011, 18:47:38 pm
Worked great in putting the og: information in there only problem for me is that the URL shown is not the sh404sef url.
Shame
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on October 19, 2011, 18:52:10 pm
Worked great in putting the og: information in there only problem for me is that the URL shown is not the sh404sef url.
Shame

what version of sh404sef are you using?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: JasonShoulet on October 27, 2011, 06:26:32 am
First off THANKS for a great plugin!  My like button posts everything to my wall appropriately (picture, url and message) but on my website I get the red error and the page doesn't remember I liked it.  The send button works without issue.  Here's my information:

Error: The app ID specified within the "fb:app_id" meta tag is not allowed on this domain. You must setup the Connect Base Domains for your app to be a prefix of http://www.careerpillar.com/Interview-Mentor-Products/What-Are-Your-Salary-Expectations.html.

sh404sef version: 2.3.0.988

VM version: 1.1.7 and the cookie checkbox is unchecked

Any help would be greatly appreciated.  Thanks

Jason

!!!! FIXED !!!!

Had to go into my FB app settings and add my domain to the App Domain setting (careerpillar.com) and then fill out the site URL setting (this setting is further down the page from the App Domain setting) this is the core site URL with a trailing slash "/" (http://www.careerpillar.com/).  Hope this helps someone else...THANKS AGAIN kevinwood!
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: agiovacchini on November 01, 2011, 23:31:14 pm
Hallo, thank you for the big work you have done, it's working very good. I've got only one problem: my "likes" go to facebook without images and I've red all the eight pages of posts looking for something I could have mistaken but everything seems right, even the og:image is good:

<meta property="og:image" content="http://www.agware.it/components/com_virtuemart/shop_image/product/resized/VaVeliero___Back_4e9a12efa760b_90x90.png"/>


This is the code I've putted at the top of flypage:

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) {return;}
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/it_IT/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
mm_showMyFileName(__FILE__);
 ?>


and this after the "add to cart" button:

<fb:like send="true" width="450" show_faces="false"></fb:like>


A sample page is this: http://www.agware.it/index.php/VaVeliero/Altri-accessori-Notebook/8034140802097-VaVeliero-Back-Cover-per-iPad-2-Carbonio.html

Greets,
Andrea
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: pmuruaga on November 02, 2011, 15:58:48 pm
I follow the tutorial step by step but the images are not shown, and neither the title, just the url. What could be the problem and how can I solve that? the site is live in vs-tech.com.ar.
The source is including the --meta property="og:image" -- url and title correctly, but on fb nothing is include. Thanks in advance.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on November 02, 2011, 16:27:25 pm
I suspect that the problem is with Facebook.  Nothing that I "like" right now is showing up on my FB wall at all.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: pmuruaga on November 06, 2011, 17:25:10 pm
I changed my site folder structure, I used to have the site inside a subfolder, now I leave it directly over the /web directory, but it is still showing the url and not images, anyway I test with some examples I find looking for this and virtuemart with like button in other sites works correctly and show the image/title not url.
Any idea on how can we solve this.
Thanks in advance.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on November 13, 2011, 15:16:30 pm
Facebook has clearly changed the behavior of the Like button.  No matter what web site I visit, if I click "Like", it does not post anything to my wall. 

I need to spend some time looking into this more, but haven't had a chance yet.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: zdjl505 on November 24, 2011, 06:35:01 am
Hi Kevin, thanks for your great plugin. This plugin can show product name in 'og:title' meta. In my website, I want to show product category & combined with product name in 'og:title' meta with format 'Product Category | Product Name'. To do so, I slightly change your plugin as follow:

1. Add extra option in 'vmp_title' parameter for choosing 'Product Category | Product Name' as format for 'og:title' meta. To do so I change file vmopengraph.xml as follow
Before
Code: [Select]
<param name="vmp_title" type="list" default="1" label="Title"  description="Select which of the options you would like to use for the og:title tag.  ">
  <option value="0">Do not set tag (uses page title)</option>
  <option value="1">Use Product Name</option>
</param>
After
Code: [Select]
<param name="vmp_title" type="list" default="1" label="Title"  description="Select which of the options you would like to use for the og:title tag.  ">
  <option value="0">Do not set tag (uses page title)</option>
  <option value="1">Use Product Name</option>
  <option value="2">Use Category Name | Product Name</option>
</param>

2.  Modify vmopengraph.php for extracting 1st publish product category. The changes as follow:
Before
Code: [Select]
// add title if requested (FB will default to the page name if no tag added)
$title = $params->get('vmp_title');
if ( $title ) {
$db->setQuery("SELECT product_name FROM #__vm_product WHERE product_id = " . $db->quote($prod_id) );
$db->query();
$result = $db->loadResult();
if ($result) {
$document->addCustomTag( '<meta property="og:title" content="' . $result . '"/>' );
}

After
Code: [Select]
// add title if requested (FB will default to the page name if no tag added)
$title = $params->get('vmp_title');
if ( $title == 1 ) {
$db->setQuery("SELECT product_name FROM #__vm_product WHERE product_id = " . $db->quote($prod_id) );
$db->query();
$result = $db->loadResult();
if ($result) {
$document->addCustomTag( '<meta property="og:title" content="' . $result . '"/>' );
}
} elseif ( $title == 2 ) {
// get the number of categories for the product
$db->setQuery("SELECT COUNT(*) FROM #__vm_product_category_xref WHERE product_id = " . $db->quote($prod_id) );
$db->query();
$numcats = $db->loadResult();

// get list of categories
$db->setQuery("SELECT category_id FROM #__vm_product_category_xref WHERE product_id = " . $db->quote($prod_id) );
$db->query();
$cats = $db->loadResultArray();

// find category name of the first published category
foreach ($cats as $cat) {
$db->setQuery("SELECT category_publish, category_name FROM #__vm_category WHERE category_id = " . $db->quote($cat) );
$db->query();
$row = $db->loadRow();
if ( $row[0] == 'Y' ) { break; }
}
$cat_name = $row[1];

// find product name
$db->setQuery("SELECT product_name FROM #__vm_product WHERE product_id = " . $db->quote($prod_id) );
$db->query();
$prd_name = $db->loadResult();

$result = $cat_name . ' | ' . $prd_name;
if ($result) {
$document->addCustomTag( '<meta property="og:title" content="' . $result . '"/>' );
}
}

This modif already implemented in http://www.roncekembang.com (http://www.roncekembang.com).

Regards,
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: cmathias on December 03, 2011, 18:14:59 pm
Hello,

I have followed your tutorial and got the Like button working using your Open Graph plugin.
However, after I've clicked on a Like button, I have an error link displayed next to the button pointing to this:

"The app ID "xxxx" specified within the "fb:app_id" meta tag was invalid."

In the plug-in settings, I have populated the Facebook Admins field with my facebook page administrator ID.

Could you help me solve this problem ?

Thanks
Mathias
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: shakensoul on December 25, 2011, 18:59:31 pm
Merry christmas to everyone... :)

I have used this plugin and everything works except the images. Facebook always picks the wrong image for the product.

As per an earlier post, I tried changing the code from the

Code: [Select]
$imgurl = JURI::base() . "components/com_virtuemart/shop_image/product/" . $image;
to

Code: [Select]
$imgurl = $image;
but still fb gets the wrong image. When I look at the product page, the image url is displayed as

http://www.futuresounds.in/components/com_virtuemart/show_image_in_imgtag.php?filename=resized%2FJunbai_Modern_4ef38f65edfab_130x120.jpg&newxsize=130&newysize=120&fileout=

I tried changing the image path to com_virtuemart/shop_image/product/resized/ but did not help.

Any help would be appreciated to resolve this issue. Domain is www.futuresounds.in
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: ludmoral on December 31, 2011, 18:10:52 pm
mine is working alright just one problem.... when I go to a child product the button disappearse, anyone seen/solved that one?

Best regards
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: joomlaforever on January 04, 2012, 07:30:05 am
is there a plugin for VM2?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: jjakes24 on January 16, 2012, 02:36:12 am
This is not working for me as well, the image is always incorrect.  Using the facebook debugger, it is always pulling the incorrect final URL.  The initial and conanical URLS are correct and have the correct OG meta tags in them.  This doesn't seem to matter though as it fully hinged on the final URL which is completely wrong somehow.

http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.stupidhockey.com%2Fplayer%2Fplayersticks%2F1-piece-sticks%2Fdetail%2F79-rink-rat%2Fflypage.pbv.tabs%2F547-rink-rat-vt733-4-pack%3Fsef%3Dhcfp

anyone have any ideas?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on January 24, 2012, 21:49:24 pm
Sorry folks...for some reason I have not been getting notifications of new posts in this thread.

jjakes24... I just went to your site and clicked like on http://www.stupidhockey.com/hockey-wheels-a-accessories/hockey-wheels-bearings/detail/81-wheels-bearings/flypage.pbv.tabs/210-bevo-abec-3-bearings-16-pack?sef=hcfp.  It posted the correct image to my wall, so I assume that you got it fixed.

joomlaforever.... no, no VM2 plugin yet.  I need to get the time to upgrade my own site to VM2 before I can do this.  Hopefully in the next couple of months.

ludmoral... haven't heard of that issue before.  can you post a sample url?

shakensoul ... I went to your site and clicked like on http://www.futuresounds.in/future-sounds/bihu-songs/jaanmoni-anjana-2009 and it properly posted the product to my wall with the correct image, so I assume that you fixed it.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: LuukDriessen on January 26, 2012, 10:50:42 am
Hello Kevin.

I introduced Facebook to my webshop. I have a general 'like' button of my company in my sidebar.
I know that when I want to use them for my products I have to use the XFBML version. But I want the like button to show my company logo and description every time someone likes it.

I activated the button but when I click in them I see a wrong image. I use the Iframe code, because it's my only like button.

Do you have any tips?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on January 26, 2012, 14:39:22 pm
Hello Kevin.

I introduced Facebook to my webshop. I have a general 'like' button of my company in my sidebar.
I know that when I want to use them for my products I have to use the XFBML version. But I want the like button to show my company logo and description every time someone likes it.

I activated the button but when I click in them I see a wrong image. I use the Iframe code, because it's my only like button.

Do you have any tips?

website: www.wilmagardensystems.com

I cannot access your site as it is currently down for maintenance.  Are you saying that instead of the product images being used by Facebook you just want your company logo used?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: carionpiet on March 06, 2012, 21:27:16 pm
Hi,

I'm new here.
I'm trying to get this working.
The buttons appear on the site, but sometimes the textfield disappears when I try to enter it...
In Facebook I only get "an image" of the site (not the product image) and the productname isn't there at all.

Can somebody help me
http://fara.testcarion.be/ (http://fara.testcarion.be/)
Thanks
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on March 07, 2012, 18:13:44 pm
Hi,

I'm new here.
I'm trying to get this working.
The buttons appear on the site, but sometimes the textfield disappears when I try to enter it...
In Facebook I only get "an image" of the site (not the product image) and the productname isn't there at all.

Can somebody help me
http://fara.testcarion.be/ (http://fara.testcarion.be/)
Thanks


Looking at the source for your page, I see:
<meta property="og:image" content="dccb8223891a17d752bfc1477d320da9.jpg"/>

The image tag content should be a full URL pointing to the thumbnail image.  What version of VM and Joomla are you running?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: carionpiet on March 08, 2012, 09:21:29 am
Hi Kevin,

I'm running Joomla 1.5.25 and Virtuemart 1.1.9 stable
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: LuukDriessen on March 09, 2012, 10:01:09 am
Hello Kevin.

Today I'm trying to integrate Facebook with my webshop.
I used your tutorial, documentation and forum posts.

But I have a problem.
When I 'Like' a product, it works, it looks like it works perfectly.

But, when I go to FB I don't see my like.
One time, I saw my like on FB but it didn't have an image or a description.
Other times I click on 'like' but I get a error message. Something like: Facebook is unable to get content of your website.

I installed the open graph plugin, installed the SDK plugin and install recanonical plugin.
In the Open graph plugin I added a f: og:image  Is this correct?
In the admin section I added my id of facebook. I only added the number? Is this correct?


Thanks in advance

Update! It's working now! The problem was that I don't created an fb app. With only a user I get a few errors.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: carionpiet on March 09, 2012, 17:18:47 pm
Got it working now,
reinstalled the plugins and I had to disable Virtuemart SEF.

thanks for the plugin
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: papercolorly on March 12, 2012, 15:23:42 pm
Thank kevinwood for your post. It has many information for me. ;)
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: matran241091 on April 01, 2012, 06:31:06 am
here.I don't understand about 2 problem
2.Click on the “Get Code” button.  Copy the code from XFBML version.
what the code i need copy
It is 1,2 or 3 or all
5.After you paste in the button code, edit it slightly by removing the href=”".  Now save the template.
can you teach me more !!!
anyone can upload a flypage example for me.Thank
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: iamfacebookmanyo on May 23, 2012, 05:00:32 am
Thanks very much
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: LuukDriessen on May 25, 2012, 12:01:38 pm
Hello Kevin,

I have a problem with my facebook open graph like button.

- I disabled the cookies in virtuemart
- Entered the xfbml code into the correct standard flypage.

Then I installed the open graph plugin.
- Open graph type: og:image
- Add the og:url : Yes
- Facebook ID: I have a FB account and a FB page. Do I need to insert the ID of my user account or is it also possible to use the ID from my FB Page?
- In FB I have a sef user url. So I can't see my user ID. But when I hover my profile picture I see my user ID. Is that the correct one? Or is there a better way to find my user id? (Because every picture has a different user ID.

As you can see on my website (PM) the facebook like is working, but I can't get the images to work.

Could you help me please?

Thanks in advance.

Gr Luuk






Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: incineratorbg on June 18, 2012, 17:17:48 pm
Is this tutorial the same for VM 2.0.6?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: mbit on June 28, 2012, 10:28:36 am
Hello, i am trying to make this work extension works with joomfish but in both languages i use og:title is using default product name  and not active (eg trasnlated one) any fix how to call the proper product_name?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: her63 on July 27, 2012, 20:22:28 pm
please help how about adding facebook comments to virtuemart 2.0 product. thank you God Bless You
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: her63 on August 03, 2012, 19:05:09 pm
I am using joomla 2.5.6 and virtuemart 2.0.8e . please help me thank you , www.dewiflorist.com
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on August 14, 2012, 17:50:15 pm
Hi all.  Just a note that the Wordpress site which had the tutorial on it got hacked and I lost the documentation.  I will try to find a copy of it and put it up here.

Also keep in mind that the plugin still only works for Joomla 1.5 and VM 1.  I have not had any time to upgrade the plugin and don't expect any opportunity to do so anytime soon.

I will continue to provide support on a best effort basis.  It might be easier to email me, however, since I don't seem to get notifications when people post here.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: her63 on August 28, 2012, 10:24:59 am
sorry My english not so good , but I wouls to share how fb like buttom show on product pages virtuemat 2.0.8e joomla 2.5.6 that a look www.dewiflorist.com (http://www.dewiflorist.com)

1. login your fb -> down clik developers-> build for website-> core consept->clik like bottom -> inpur your url begin with http:\\........,-> clik code
    script column 1 put in your joomla templete after < body >
2. find your template/your template/html/com_virtuemat/product detail/default.php............find <?php } // Product Description END . put beforo this line  fb second comln.

if you any question my email. herrycandi@hotmail.com.

I love virtuemart,
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: carionpiet on October 16, 2012, 21:18:32 pm
Hi there,

this used to work just fine, but now it seems to be broken  :(
When I press "like" button, I can enter a message but nothing is posted.
I need to confirm and get a popup with url:
http://www.facebook.com/plugins/error/confirm/like?iframe_referer=http%....

http://fara.testcarion.be/index.php/ladies-only?page=shop.product_details&product_id=60&flypage=flypage.tpl&pop=0
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: kevinwood on October 17, 2012, 03:03:29 am
Hi there,

this used to work just fine, but now it seems to be broken  :(
When I press "like" button, I can enter a message but nothing is posted.
I need to confirm and get a popup with url:
http://www.facebook.com/plugins/error/confirm/like?iframe_referer=http%....

http://fara.testcarion.be/index.php/ladies-only?page=shop.product_details&product_id=60&flypage=flypage.tpl&pop=0


Facebook occasionally determines that certain sites are attempting to 'click-jack'.  When that happens, it does not automatically accept the "like" button but asks that the user confirm their like first.  This is what is happening here.  It has nothing to do with the plugin.  You will need to find out why Facebook thinks your site is engaging in clickjacking.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: carionpiet on October 17, 2012, 09:26:31 am
Okay,

I can understand why they want confirmation, but when I do, nothing is posted.
Occasionally a like is posted.
Has somebody had the same problem? I need some help here.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: seabass on November 06, 2012, 11:11:23 am
This will add a dynamic FB like button to all virtuemart products. Using VM 2.0.12F  / Joomla 2.5.7

1. Setup /yourtemplate/html/com_virtuemart/productdetails/default.php Make sure you have this template override selected in your shop config.
2. Below approx line 260 <?php echo $this->product->product_desc; ?> </div>

ADD -
Code: [Select]
<fb:like id="fb" href="http://www.yourdomain.com" layout="button_count"></fb:like>

    <script type="text/javascript">
var sUrl = window.location;
document.getElementById('fb').setAttribute('href', sUrl);
</script>

3. Go to your template/index.php directy below body tag add:
Code: [Select]
<div id="fb-root"></div>

<script>
  window.fbAsyncInit = function() {
    FB.init({appId: '135372606562726', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
</script>

Check your Product pages.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: balai on February 22, 2013, 11:02:09 am
Thanks it seems to work
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: lineofstars on May 19, 2013, 22:07:29 pm
This will add a dynamic FB like button to all virtuemart products. Using VM 2.0.12F  / Joomla 2.5.7

1. Setup /yourtemplate/html/com_virtuemart/productdetails/default.php Make sure you have this template override selected in your shop config.
2. Below approx line 260 <?php echo $this->product->product_desc; ?> </div>

ADD -
Code: [Select]
<fb:like id="fb" href="http://www.yourdomain.com" layout="button_count"></fb:like>

    <script type="text/javascript">
var sUrl = window.location;
document.getElementById('fb').setAttribute('href', sUrl);
</script>

3. Go to your template/index.php directy below body tag add:
Code: [Select]
<div id="fb-root"></div>

<script>
  window.fbAsyncInit = function() {
    FB.init({appId: '135372606562726', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
</script>

Check your Product pages.

Hi seabass!
well  this is what I was looking for,but in Joomla 1.5.22 and the VM  1.1.6.
I was searching  the same route to the files /yourtemplate/html/com_virtuemart/productdetails/default.php  but it seams that the structure and where the file ware installed is diffrent,I did not find any subdirectory "productdetails" in /yourtemplate/html/com_virtuemart,so I could not add the code.Do you know where is that specific defalut.php according to the versions of Joomla 1.5.22 and the VM  1.1.6 ?
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: Markus21 on May 27, 2013, 14:03:43 pm
Thanks! It works now flawlessly.
Title: Re: Tutorial: How to get Facebook Like working on your Virtuemart site
Post by: alvinwang21 on August 27, 2013, 02:14:37 am
This will add a dynamic FB like button to all virtuemart products. Using VM 2.0.12F  / Joomla 2.5.7

1. Setup /yourtemplate/html/com_virtuemart/productdetails/default.php Make sure you have this template override selected in your shop config.
2. Below approx line 260 <?php echo $this->product->product_desc; ?> </div>

ADD -
Code: [Select]
<fb:like id="fb" href="http://www.yourdomain.com" layout="button_count"></fb:like>

    <script type="text/javascript">
var sUrl = window.location;
document.getElementById('fb').setAttribute('href', sUrl);
</script>

3. Go to your template/index.php directy below body tag add:
Code: [Select]
<div id="fb-root"></div>

<script>
  window.fbAsyncInit = function() {
    FB.init({appId: '135372606562726', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
</script>

Check your Product pages.

Hi, Could anyone explain details about what is the function of code part 3? and the exactly location of index.php?  I have tried templates/my templates/index.php and website said there is an unexpected "<" there.