Verge Studios Blog about Graphic Design, Web Design, and Joomla

Facebook Like Button module

Please note: The button you see above the article ↑ is part of the new open graph plugin we are working on. The module demo is below. We will post about this soon!

In Facebook's bid to take over the world, they have introduced the Facebook Like Button. We decided that it might be useful to have a Joomla module that auto-generates the code for this button, so we set to work and in an hour we had assembled a first version that seems to run pretty well. We are assuming that the Like Button will change over time, so we are trying to keep our code as easy to change as possible. For a picture and some more information continue reading below.

The module allows you to output the button either in the iframe friendly format or as FBML if your site is using FBML. It also has a toggle switch to automatically discover the URL for each page it is on or you can just place a site wide one. Otherwise it should allow for all configurations available if you were to hard code it. Note: The module comes without implicit or explicit warranties and must be used at own risk.

Future improvements would be to use Open Graph meta tags but we have yet a good way to try and match specific ones to page content.

Here is an example of the button for this page with the language set to German, default is English (setting language only works in iframe mode):

**Lori points out some clarification on different button features:

"The basic Like button is available via a simple iframe you can drop into your page easily. A fuller-featured Like button is available via the XFBML tag and requires you use the JavaScript SDK. The XFBML version allows users to add a comment to their like as it is posted back to Facebook."**

** Playak points out the following bug in the Facebook publisher which may cause it not to read pages properly:

i found the problem i think. i noticed that the facebook publisher also has problems reading my pages, so i started narrowing down what caused that. it seems to be in the joomla menu. when it has span tags with just a space inside, facebook chokes on it.

<li><a href="/map.php"><span class="l"> </span><span class="r"> </span><span class="t">Map</span></a></li>

to

<li><a href="/map.php"><span class="l"></span><span class="r"></span><span class="t">Map</span></a></li>

Note the space in the spans

*** Jacob found a solution to the problem:***

in my templates/templatename/html/mod_mainmenu/default.php.
Line 33&35...removed the space. Also had to change the space in the span "l" and "r" in functions.php in the template root folder.

NOTE: removing the space did not work I had to put in ' '

$lspan = & $liFirstChild->addChild('span', array('class' => 'l'));
$lspan->setData(' ');
$rspan = & $liFirstChild->addChild('span', array('class' => 'r'));
$rspan->setData(' ');

Please check out his blog: http://www.jacobv.com/technology/page-could-not-be-found-error-with-facebook-like-button/ for more information and other goodies.

Please take a look here http://developers.facebook.com/docs/reference/javascript/ for more information on FBML

Attachments:
FileDescriptionFile size
Download this file (mod_vergefacebooklike.zip)mod_vergefacebooklike.zipModule to render the new Facebook like module with all configurations and output either as an iFrame or FBML3 Kb

Comments

Posted by efil on April 23, 2010 at 07:54 am
Hello,
Thanks! Very useful module.
The problem is that it's not automatically discover the URL for the page, but the The site's primary address. Reply
Posted by Max Neuvians on April 23, 2010 at 12:05 pm
Hi,

we currently use JURI::current() to discover the URL. This may only be available in Joomla 1.5. If you are using 1.5, please send me a URL and I can take a look and replace it with a native PHP function. Thanks for your interest! Reply
Posted by Efil on April 23, 2010 at 03:55 pm
I use joomla 1.5

You can see it here:
http://www.maccabi-yafo.com/index.php?option=com_content&view=article& id=2984:2009-09-11-15-41-57&catid=13:joomla&Itemid=100066

Thanks. Reply
Posted by Max Neuvians on April 23, 2010 at 04:05 pm
Hi Efil,

I have updated the module to not use JURI::Current(); It seems like the optional parameters were not passed into the URL. I have replaced the Current() function with one that should read the additional parameters.

You can see that it works here as it echoes back the proper URL:

http://www.vergegraphics.com/urltest.php?option=com_content&view=artic le&id=2984:2009-09-11-15-41-57&catid=13:joomla&Itemid=100066\n\ ;nThanks

I will also put in a shameless plug to make your URLs SEO friendly :)

http://www.vergegraphics.com/blog/joomla/59-activating-seo-friendly-ur ls-in-joomla Reply
Posted by Efil on April 23, 2010 at 05:58 pm
Now it's working!

Thank you! Reply
Posted by Anonymous on April 23, 2010 at 09:02 am
hello and thanks for this winderfull mod!
is there a version for jomla 1.0?
thanks Reply
Posted by Max Neuvians on April 23, 2010 at 12:02 pm
Unfortunately we have not had the time to create a 1.0 version, but it is something we would like to do! Reply
Posted by fotis (http://thespot.gr) on April 23, 2010 at 01:30 pm
thanks for the reply :)
we will wait!
however we test the module on a joomla 1.5 and world perfect! thanks again!
good job and really quick action! Reply
Posted by Promotional Products (http://www.promotional-products.org/) on April 23, 2010 at 09:53 am
Um its ok but for some reason I get a massive white box under the module... Reply
Posted by Max Neuvians on April 23, 2010 at 11:58 am
For some odd reason facebook did not specify a height attribute, probably so that all the little images can show up. I agree that the space is to large so I have changed the back end and allowed for a height to be set. Thanks for checking us out! Reply
Posted by promotional products (http://www.promotional-products.org) on April 30, 2010 at 02:45 pm
cheers for that I will reinstall it now! Reply
Posted by chris on April 23, 2010 at 02:08 pm
hi max, i get an error:

"Be the first of your friends to recommend this. · Admin Page · Error"

when i click the recommend button Reply
Posted by Max on April 23, 2010 at 02:32 pm
Hi Chris,

do have a link I could look at? I am thinking that it might have something to do with the url in Joomla. It seems to work with SEO urls but as soon as you pass in a Joomla native URL with all the ampersands and additional parameters I can see Facebook not liking it. Reply
Posted by daniel on April 23, 2010 at 02:21 pm
i will get an error message from facebook "Die Seite unter XXX kann nicht aufgerufen werden."

which meens facebook is not possible to resolve the website Reply
Posted by Max Neuvians on April 23, 2010 at 02:50 pm
Hallo Daniel,

kannst du mir vielleicht einen Link zu schicken wo das Modul zu sehen ist? Ich denke das es bei Facebook Probleme gibt wenn die URL mit mehreren Variablen gespickt ist, bzw. SEO freundliche URLs nicht aktiviert sind. Vielen Dank für dein Interesse an dem Modul! Reply
Posted by chris on April 23, 2010 at 02:34 pm
here is the link, http://sph.bu.edu/chrisinsider/index.php/Recent-News/s.html , thanks! Reply
Posted by Max Neuvians on April 23, 2010 at 02:48 pm
Hi Chris,
have you set autodiscover to on? It seems like the URL in your iframe points to:

http://sph.bu.edu/chrisinsider/Recent-News/s.htm

while your page is:

http://sph.bu.edu/chrisinsider/index.php/Recent-News/s.html

it seems you are missing the index.php in the url. Reply
Posted by chris on April 23, 2010 at 02:55 pm
Hi max, thanks for the quick responses. Yes, Auto URL Discovery, is set to on. Reply
Posted by Max Neuvians on April 23, 2010 at 03:07 pm
Hi Chris,

I have updated the module to not use the native Joomla JURI::current() function to get the URL. Instead it uses a generic php function. I have updated the module, and if you would not mind trying it and reporting back, that would be greatly appreciated! Reply
Posted by Igor (http://crnobelo.com) on April 23, 2010 at 03:05 pm
Hi,

Wouldn't this be more useful if it was a content plugin instead of a module and the user to be able to publish it below each article?

Thanks,
Igor. Reply
Posted by Max Neuvians on April 23, 2010 at 03:16 pm
Hi Igor,

yes it would be very useful as a content plugin. However, we often find that we make pages totally composed of modules, like our frontpage and that it is easier to load modules into content via the loadposition plugin.

For a content plugin I would also prefer to leverage open graph meta tags automatically, so we will wait until those are completely defined and established. All that is to say that eventually we will probably produce a content plugin, but right now the best we could reliably do is a module, and a very simple one at that. Reply
Posted by Igor (http://www.crnobelo.com) on April 24, 2010 at 10:42 am
Including the module into articles via loadposition plugin does the job, but what if i have thousands of articles that I wish that 'like' button to appear on?
Edditing and adding {loadmodule} in each of them doesn't sound like a nice solution. Reply
Posted by Max on April 24, 2010 at 12:54 pm
Hi Igor,

I agree, that would be pretty horrible. Given that we probably won't put out a plugin till the Open Graph specs are laid out better (lack of time and resources), I am hopping somebody else will publish a content plugin soon rather than later. If it does pop up, I will be more than happy to link it here. Reply
Posted by Ryan on May 04, 2010 at 11:26 pm
I would really really like to see the content plug-in version of this so you can easily implement it into large sites if anyone figures it out :)

Reply
Posted by Max Neuvians on May 05, 2010 at 02:02 pm
Hi Ryan,

I am starting to think we might be one of the few studios that prefers joomla modules over plugins. I promise though that once I have some more time, I will put something out! Reply
Posted by chris on April 23, 2010 at 03:13 pm
Max,

It works! Thanks so much.

-Chris Reply
Posted by Max Neuvians on April 23, 2010 at 03:17 pm
Hi Chris,

awesome! Thanks for testing and your feedback! Reply
Posted by Team AuroraTheme on April 23, 2010 at 05:41 pm
i think an content plugin would make it suffice. am working on an plugin for joomla for article pages with ilike Reply
Posted by Juan (http://www.relatosdeultratumba.tv) on April 23, 2010 at 08:02 pm
Hi, i want to know how to include the button in to the article like a plugin not a module, how can i do this to call the current URL in the code Reply
Posted by Kiya on April 24, 2010 at 03:51 am
I want to put it below the article and not in module position..how to do it Reply
Posted by Jolle on April 24, 2010 at 05:43 am
Thanks Max! Works like a charm! Reply
Posted by Max Neuvians on April 24, 2010 at 12:48 pm
Hi Juan and Kiya,

you would probably need this module in form of a plugin. You can work with individual pages using the loadposition plugin right now, but it would be a huge hassle. We also want to eventually make a plugin but we would in that case like to use the Open Graph meta tags, which seem to still be in flux.

I am sure somebody soon will write a similar plugin with the same scope as this module, and I will be happy to link it on this page, till we get around to making the one we want to see.
Reply
Posted by Hernan on April 24, 2010 at 12:50 pm
The script has the height option, so what you can do is to check the module folder/tmpl and open default.php. Line 25 you will find height:px , change that for a value..like: height:30px and it should solve the problem. Reply
Posted by Max Neuvians on April 24, 2010 at 12:56 pm
Hi Hernan,

that is the one option, but I have also update the back end options to allow for the height to be set manually. Either way works great. Reply
Posted by Mark (http://ablegamers.com) on April 24, 2010 at 01:39 pm
I installed it and gave it a test. I got an error

"The page at http://www.ablegamers.com/index.php?option=com_content&Itemid=86&a mp;catid=37&id=951&lang=en&view=article could not be reached."
Reply
Posted by Max Neuvians on April 24, 2010 at 02:18 pm
Hi Mark,

the URL seems to resolve alright for me. If Facebook is throwing that error it might because, according to your webpage, you are moving servers? Facebook might not have received the updated DNS yet. If you send me a link with a test page I can take a look though. Thanks for giving it a try! Reply
Posted by Mark (http://www.ablegamers.com) on April 24, 2010 at 08:08 pm
yah that move is happening this evening. The DNS has not changed yet so that is not the issue :( Reply
Posted by Max Neuvians on April 24, 2010 at 08:13 pm
Hi Marc,

yea it seems that there is a problem with having the iframe run on sites with additional facebook features (connect, comment, share). I have not been able to pinpoint which one it is.

Facebook is essentially returning a valid url and saying it is not able to connect to it, which makes no sense. Reply
Posted by fab on April 24, 2010 at 02:10 pm
thanks for this modules for us...ignorants ;-)
Could you add the possibility to choose to have the short version (only a number instead of xx people like that '" ???

thanks again Reply
Posted by Max Neuvians on April 24, 2010 at 02:23 pm
Hi Fab,

if you switch the module layout style to button_count it should show the other button. Thanks for giving the module a spin!

Reply
Posted by fab (http://www.lllfrance.org) on April 24, 2010 at 02:51 pm
oooh thanks i missed that ! Reply
Posted by fab (http://www.lllfrance.org) on April 24, 2010 at 04:20 pm
Me again : when I switch to button count, the count seems to stay at 1 even if 2 people liked it..
? Reply
Posted by Max Neuvians on April 24, 2010 at 04:33 pm
Hi Fab,

welcome back! In theory it should. Unfortunately this may be a something pertaining to facebook because all we can do is call their iframe. Whatever is in the iframe is up to them. I will look into if there is some sort of conflict happening.
Reply
Posted by fab (http://www.lllfrance.org) on April 24, 2010 at 05:14 pm
Thanks !
if i switch to fbml it disappears (maybe this helps) Reply
Posted by getimo on April 24, 2010 at 02:38 pm
Nice to see a module that fast. Unfortunately the auto discover doesn't work for me (Core SEF) - it always links back to the frontpage.

I have some suggestions:

- include metatags for types/objects
- with jReviews+Geomaps together it would be a killerfeature

getimo Reply
Posted by Max Neuvians on April 24, 2010 at 02:47 pm
Hi getimo,

If you send me a link I can take a look. I use a php function that reads the $_SERVER variable.

Maybe there is a problem with them not being read properly?

Also thank you very much for your suggestions, I agree that those things should be in a good plugin and when we do get around to it, I would love to add those in! Reply
Posted by getimo on April 24, 2010 at 03:53 pm
Thank you for your fast answer.

I've found another issue: I'm using jomsocial too with facebook connect. If both buttons (the "old" facebook connect button and the like button) then there are several issues regarding the popup behaviour.

Noticing that I'm really confused on how the whole thing should work in the future? Of course I want to benefit from all resources of this new data model but don't know which system to use,

For the FBML type you need an application. I already setup an application for jomsocial/facebook connect and so on...

I'd love to read a documentation on how to act now generally. Reply
Posted by Max Neuvians on April 24, 2010 at 04:02 pm
Hi Getimo,

Interesting because it seems that most people who are having trouble have some sort of other facebook modules installed.

I too am a little frustrated on which way we are going with all this so I am trying to keep it simple now and have some of the better stuff come out when the dust has settled. Reply
Posted by Luca Mengoni (http://www.lucamengoni.com) on April 24, 2010 at 02:38 pm
Great Job!! Thank you very much! I'll wait for the plugin too ;) Reply
Posted by Max Neuvians on April 24, 2010 at 02:43 pm
Hi Luca,

thanks for your support! Reply
Posted by jacob (http://www.montrealfashionbizvie.com) on April 24, 2010 at 03:36 pm
Hi,
Great plugin...unfortunately I am having the error "The page at XXXX could not be reached."

Did any of the others who had this issue resolve their problem? Max, I've included the website which shows the problem in the comment submission. Any of the articles will show your module implemented...and the error message on clicking the button

Thanks for any help on this. Reply
Posted by Max Neuvians on April 24, 2010 at 03:57 pm
Hi Jacob,

that is really strange. The code seems to be working alright. I actually think this an error on facebook end. I generated a code for your button using the facebook button generator found here:

http://developers.facebook.com/docs/reference/plugins/like

and posted the html it in a testbed page:

http://vergegraphics.com/demo

you will see it returns the same error. Interestingly enough Mark from a few comments above had the same bottom bar installed as you, with the same errors. The error is returned by facebook and the URL loads fine in my browser so it looks like facebook is unable to read the page properly for whatever reason. Reply
Posted by Jacob on April 24, 2010 at 04:49 pm
Hi Max,
Thanks for looking into it...I suspected a facebook issue too. Maybe facebook will sort it out. All the best Reply
Posted by Mark (http://AbleGamers.com) on April 24, 2010 at 08:32 pm
Max, I uninstalled the Wibiya Toolbar and it looks like your module works just fine. Hmmm I do not want to have to choose the toolbar over like
:( Reply
Posted by Mark (http://AbleGamers.com) on April 24, 2010 at 08:36 pm
scratch that.. did not work :( Reply
Posted by Max Neuvians on April 24, 2010 at 08:47 pm
Hi Mark,

I am really sorry to hear that it is giving you so much trouble. If you really want to try and debug, try and use the code generated here:

http://developers.facebook.com/docs/reference/plugins/like

and stick it into a custom html module. Be sure to use the URL of a page that did not work previously. If it works then there is something wrong with the module, if it still doesn't work then it is something with facebook not playing nicely. My next step would be to set up an empty page, add the code, and then activate the modules one by one on the page, as to so see which ones are causing a conflict. Reply
Posted by EzerchE (http://www.oyunmaniac.com) on April 25, 2010 at 10:19 am
Hello, i have a problem, my facebook buttons doesnt detect the web page link. it only likes main page you can check it from my website. thanks. (i am using acesef for seo) Reply
Posted by Max Neuvians on April 25, 2010 at 12:17 pm
Hi EzechE,

I can confirm that the module does not seem to work with acesef on your webpage. I will look into why this is happening and hopefully I can come up with a fix for you. Reply
Posted by EzerchE (http://www.oyunmaniac.com) on April 26, 2010 at 11:33 pm
Thank you for your interest max, waiting for solution. Reply
Posted by jeroen (http://www.netpresent.net) on April 25, 2010 at 05:39 pm
Nice module. Thanks for the fast work!

I'm also getting the same error though: error "The page at XXXX could not be reached."

tried auto-discovery on and off, fbml on/off, and disabled jfbc (facebook connect). nothing helps. driving me mad...
Reply
Posted by Max Neuvians on April 26, 2010 at 11:32 pm
Hi Jeroen,

do you use some sort of SEF package or any other URL modifier? I am starting to wonder exactly what agent Facebook uses to contact the pages. I could even imagine that a strong robots.txt could block them if they use an unusual browser identifier string. Reply
Posted by Philipp (http://www.dalinyebo.co.za) on April 25, 2010 at 07:58 pm
it also does not work for me: "The page at http://www.dalinyebo.co.za/index.php could not be reached."
Any ides where to start with trouble shooting? Reply
Posted by Max Neuvians on April 26, 2010 at 11:40 pm
Hi Philipp,

I am having trouble connecting to your website. Do you experience any downtimes? It might be that Facebooks servers are timing out, assuming that they have a a very short timout period.

Connecting to the website seems to be slow but not horrible:

http://just-ping.com/index.php?vh=http%3A%2F%2Fwww.dalinyebo.co.za&c=& s=ping!

it might be that the delay is causing them to not connect immediately and time out. I would try and use the button generator found here:

http://developers.facebook.com/docs/reference/plugins/like

and see if that works any better. Good luck! Reply
Posted by Carlos (http://www.brandsgym.com) on April 26, 2010 at 09:43 am
Hello, Thank you for the module. Can I use just for the blog? I mean, I just want to use it in my post, not in all the website. Any chance? Reply
Posted by Max Neuvians on April 26, 2010 at 11:43 pm
Hi Carlos,

what you will need is a Joomla plugin. Hopefully we will be working on a plugin soon or later, but right now we are lacking the time to build the plugin we would like to have. Thanks for checking us out! Reply
Posted by neth (http://www.arbev.co.il) on April 26, 2010 at 03:35 pm
I'm having the same issue some other people have reported - Facebook returns an error that the page could not be reached.
Is there a way to utilize the sef URL generated by sh404sef when sending the data to the Facebook server? I suspect the over complicated none SEF url is just too much for Facebook to handle. Reply
Posted by Max Neuvians on April 26, 2010 at 11:53 pm
Hi Neth,

yea it seems while the url being submitted:

http://www.arbev.co.il/index.php?option=com_content&Itemid=63&catid=25 &id=133&lang=he&view=article

is a legal one, Facebook does not seem to know what exactly is going on. I find it interesting that sh404sef seems to rewrite the URL after it has been parsed by the Server. I will try and see if I can include their url generation method in the module. Reply
Posted by Julia (http://soulmateplan.com) on April 26, 2010 at 11:57 pm
Hello, I can not seem to get this to display properly!!

A big box comes up and shows my facebook page, greyed out like, when logged in. When logged out of facebook, a facebook home screen appears, and when hovered over, it says something like to take me to facebook home..

Any suggestions??

soulmateplan.com Reply
Posted by Max Neuvians on April 27, 2010 at 12:02 am
Hi Julia,

I just took a look and it seems like the Wibiya tool bar has integrated the button correctly.

I am glad it is working! For all others interested:

http://www.wibiya.com/ Reply
Posted by Randy (http://www.arttechstudio.com) on April 27, 2010 at 03:30 am
I could not install. I got the following error message:

* Warning! Failed to move file.
* JFolder::create: Could not create directory
* Unable to create destination

Reply
Posted by Max Neuvians on April 27, 2010 at 02:12 pm
Hi Randy

that looks like a permission problem to with the folders in the joomla directory. I have seen that happen when the folders do not have the correct permissions or the temp folder is not set up correctly:

http://kslim.net/blog/computing-2/internet/jfoldercreate-could-not-cre ate-directory Reply
Posted by Randy (http://www.actionwebsiteandseo.com/) on April 27, 2010 at 04:09 pm
The module does not show up in my uninstall module extension manager, but it is still in my module manager. How can I uninstall? Thanks! Reply
Posted by Max Neuvians on April 27, 2010 at 04:50 pm
Hi Randy,

usually when a module fails to install properly you have to remove the remnants manually.

From a google result:

One way is to delete any files and folders added by the extension. Depending on the extension, search through the "components", "modules" and "plugins" directories in your Joomla! tree and remove the associated entries. Repeat the process in the "administrator" directory. Afterwards, access the database using phpMyAdmin for example and remove entries relating to the extension.
Reply
Posted by Randy (http://www.actionwebsiteandseo.com/) on April 27, 2010 at 05:42 pm
Do you think I can just just delete the folder from joomla using ftp? Reply
Posted by Max on April 27, 2010 at 05:59 pm
Hi Randy,

that should do the trick, but please only remove mod_vergefacebooklike and be sure to have back ups

Reply
Posted by Randy (http://www.actionwebsiteandseo.com/) on April 27, 2010 at 03:32 am
I get the same could not be reached error message on this site http://www.actionwebsiteandseo.com/ Reply
Posted by Max Neuvians on April 27, 2010 at 02:16 pm
Hi Randy,

do you use any special access restrictions on your site? I am gathering more and more that Facebook has a problem with connecting to certain sites because the error it returns is:

Website Inaccessible

I would try and see if the button generator by facebook provides the same errors:

http://developers.facebook.com/docs/reference/plugins/like

Reply
Posted by pamel_a (http://welcometoforks.net) on April 27, 2010 at 09:48 am
Hi, there is a way to include this module automaticaly (without loadposition key)in every post/content in joomla 1.5?

Thanks a lot

Pamela Reply
Posted by Max Neuvians on April 27, 2010 at 02:21 pm
Hi pamel_a,

you will need to use a plugin for that unless you want to create a module position inside your template that is visible on all pages / a certain category. For example the modules on the left hand of this post, "Categories" and "Most Popular" are visible on all pages of the blog category. Reply
Posted by BC on April 27, 2010 at 10:46 am
The iframe like button does not work with URLs that contain parameters (ie, URLS that include a '?' followed by variables). This is proving to be a real drag and I haven't it documented anywhere. Reply
Posted by Max Neuvians on April 27, 2010 at 02:30 pm
Hi BC,

I think it depends what the parameters are. I took as an example a page with standard un SEO Joomla URLS:

http://www.ihop.com/index.php?option=com_content&task=view&id=20&Itemi d=5

and I plugged it into a custom button here:

http://www.vergegraphics.com/demo

and it works without problems. If you send me a link I can take a look at what the problem might e and if any pf the query parameters are causing a conflict with facebook. Reply
Posted by playak on April 27, 2010 at 06:50 pm
i found the problem with the error i think. i noticed that the facebook publisher also has problems reading my pages, so i started narrowing down what caused that. it seems to by in the joomla menu. when it has span tags with just a space inside, facebook chokes on it.

e.g. on a test page, if i change
Map
to
Map
the problem is gone. (i hope the html tags show in this comment)
Reply
Posted by Max Neuvians on April 27, 2010 at 06:56 pm
Hi Playak,

this is a great observation!!! If you send me the html code adjustments (max@vergegraphics.com) I will put a note in the blog and attribute it to you.
Reply
Posted by playak on April 27, 2010 at 07:07 pm
right, i was afraid the code would disappear in the comment. see also http://forum.developers.facebook.com/viewtopic.php?pid=220462#p220462 for details.
Reply
Posted by Max Neuvians on April 27, 2010 at 07:16 pm
Awesome,

I have posted a snippet of code to the main blog post. Thank you for sharing your insight! Reply
Posted by jacob on April 28, 2010 at 01:21 am
How can I edit the menu code? Its generated by joomla so how do I get to it. Thanks for any help. Reply
Posted by Max Neuvians on April 28, 2010 at 01:07 pm
Hi Jacob,

you can edit the menu in the mod_mainmenu module. However, I would not recommend that unless you know what you are doing. The menu may just be one reason it is not working, others seem to include using certain SEF addons. Also not all Joomla menu types are affected else, the module would not work on this page for example. So first yu should look at your source code and see if any menus exhibit that problem before trying to fix it. Next if it is a problem I would turn off the menu point in the backend. Reply
Posted by jacob on April 28, 2010 at 04:29 am
Hi Playak,
Where would I change the code. I've tried looking in functions.php, header.php etc. How do I get rid of the space? Thanks for any help Reply
Posted by Max Neuvians on April 28, 2010 at 03:03 pm
Hi Jacob,

I think it might be something to do either with the way the template or the mod_mainmenu is configured in the module manager. Reply
Posted by David (http://www.VivreBaieSaintPaul.com) on April 27, 2010 at 11:35 pm
Does anybody know how I can change the verb "like"? I am running a multilingual website with joomfish. For French I'd like it to say "aime" or something like that. thanks,

David Reply
Posted by Max Neuvians on April 28, 2010 at 01:03 pm
Hi David,

I have seen on websites that have buttons in different languages that the button is passing a &local variable as part of the URL. If you feel comfortable you can just edit the template file in the module to add it yourself. Otherwise I have noted it down for the next release!
Reply
Posted by Travis (http://wvcbas.com) on April 28, 2010 at 03:35 am
First of all, thanks for all your work on this awesome module. I am getting the could not be reached error too. Thanks to playak for taking the time to find the solution.

I am pretty new to all this and my question is where do I look to find the spaces that need to be removed? Thanks in advance for your help. Reply
Posted by Max Neuvians on April 28, 2010 at 01:09 pm
Hi Travis,

as I mentioned to Jacob, the space in the menu might only be one reason. Do you use a SEO modifier in your URLs, because that seems to be a number one reason why it fails on facebooks end. I am really hoping facebook will tackle these issues. Reply
Posted by Roberto (http://www.dimensionepoker.com) on April 28, 2010 at 03:42 am
Hi,
in my website don't works perfectly.
If a person click on "I like" don't appears to others.
Look here for example:
http://www.dimensionepoker.com/principianti/primi-passi/siti-poker-onl ine-gratis-dove-giocare-senza-soldi.html
Two persons have clicked on "I like" but nobody appears...

Maybe is my Seo component, sf404sef, but I'm not sure...

Thank you. Reply
Posted by Max Neuvians on April 28, 2010 at 03:06 pm
Hi Roberto,

do you use any SEF extensions?

When I look at your code the URL it is sending to facebook is:

http://www.dimensionepoker.com/index.php?option=com_content&Itemid=112 &id=73〈=it&view=article

Facebook compares that URL to the current page URL and if they don't match, it won't show the number properly Reply
Posted by Aslam A Memon (http://www.aslammemon.com) on April 28, 2010 at 06:37 am
It works just fine, but i would like to included it in my content rather then everywhere on the site, how can I do that?? pls reply Reply
Posted by Max Neuvians on April 28, 2010 at 03:06 pm
Hi Aslam,

to include it in all content, you would need a plugin. If you want you can create a module position inside your template that is visible on all pages / a certain category. For example the modules on the left hand of this post, "Categories" and "Most Popular" are visible on all pages of the blog category. Reply
Posted by Lori (http://www.hiddenridgegallery.com) on April 28, 2010 at 07:07 am
I have the iframe version working on my site. I tried out the XFBML version and it displayed fine, but the comment box gets clipped. I can see the first few lines of pixels where its trying to display, but that's it. I've put the fb:like button in a table to get it to line up with other buttons and I've also tried it in div's instead - but nothing seems to help. Is anyone else seeing this issue? Reply
Posted by Max Neuvians on April 28, 2010 at 03:09 pm
Hi Lori,

that is a really nice job integrating the button. It sounds like a css issue to me. If you could set it up on a demo page, with the clipping issue I can get some of our css gurus to take a look at. Reply
Posted by getimo on April 28, 2010 at 10:36 am
Still not working for me. I don't have these spaces. When I disable Core SEF in Joomla, it does work! Reply
Posted by Max Neuvians on April 28, 2010 at 03:25 pm
Hi Getimo,

you have a great site, and it would be sad to use unclean URL, I will try and look to see exactly what Core SEF does to the URLs. Reply
Posted by Travis (http://wvcbas.com) on April 28, 2010 at 01:14 pm
Max, I do not have any SEO mods on my site, only the defult Joomla SEO Friendly option.

I also do not have any other Facebook functions on my site. I do have a link to my FB page, but it is just a graphic with a hyperlink.

www.wvcbas.com is my site Reply
Posted by Max Neuvians on April 28, 2010 at 02:49 pm
Hi Travis,

I can confirm that facebook is unable to reach your site. It seems you also have the space in the spans of your menu. I am not sure what in Joomla is causing this. Do you use a custom template designed by a 3rd party or did you build it yourself Reply
Posted by Jacob on April 28, 2010 at 04:06 pm
OK, I resolved the spans in the menu issue on my site. Had to make the change in 2 places
in my templates/templatename/html/mod_mainmenu/default.php.
Line 33&35...removed the space. Also had to change the space in the span "l" and "r" in functions.php in the template root folder.

NOTE: removing the space did not work I had to put in ' '

$lspan = & $liFirstChild->addChild('span', array('class' => 'l'));
$lspan->setData(' ');
$rspan = & $liFirstChild->addChild('span', array('class' => 'r'));
$rspan->setData(' ');

I know the code will be lost here. If its too much diversion for Mzx to put up I will put it up on my blog. Let me know Max. Hope it saves some other poor soul. Reply
Posted by Max Neuvians on April 28, 2010 at 04:11 pm
Hi Jacob,

awesome work! I will put your solution up top, if you do end up making a blog post, please let me know and I will add the link!
Reply
Posted by Travis (http://wvcbas.com) on April 28, 2010 at 04:55 pm
Max, My template was designed using Artisteer. Reply
Posted by Max Neuvians on April 28, 2010 at 09:53 pm
Hi Travis,

take a look at the blog post by jacob, hopefully it can help you:

http://www.jacobv.com/technology/page-could-not-be-found-error-with-fa cebook-like-button/ Reply
Posted by Jacob on April 28, 2010 at 04:56 pm
Thanks Max,
I put it up here
http://www.jacobv.com/technology/page-could-not-be-found-error-with-fa cebook-like-button/

has some more details that could help others. Thanks for being so proactive about this. Reply
Posted by Max Neuvians on April 28, 2010 at 09:52 pm
Awesome,

I have added it to the above post. Thanks for all your time. Reply
Posted by Roberto (http://www.dimensionepoker.com) on April 28, 2010 at 09:10 pm
Hi Max,
yes, I'm using a SEF extention, sh404sef.
There is any solution?
Thank you again. Reply
Posted by Max Neuvians on April 28, 2010 at 09:55 pm
Hi Roberto,

I am not sure what the best solution is for url modifiers. Is it possible to use the native Joomla htaccess solution? Reply
Posted by Richard Giles (http://www.cpsucsa.org) on April 29, 2010 at 02:52 am
Awesome work. Thanks very much. We wanted the new Facebook Like button for our Joomla install, and it only took me a few minutes to add with your module. Reply
Posted by Max Neuvians on April 29, 2010 at 03:15 pm
Hi Richard,

thank you for your support. It is deeply appreciated! Reply
Posted by Roman (http://musy.co.il) on April 29, 2010 at 05:43 am
Hi,
Can you explain please how to edit the template file if I want to translate the "like" word?

I didn't find any place with English words that I can change.

Thanks! Great module! Reply
Posted by Max Neuvians on April 29, 2010 at 03:19 pm
Hi Roman,

take look at mod_vergefacebooklike.xml in the modules/mod_vergefacebooklike/

Starting on line 44 you can specify various verbs to be used. I am not sure if you can change them there or if you need to pass a "locale" variable as part of the iframe. To pass the additional parameter you will need to edit default.php in modules/mod_vergefacebooklike/tmpl/ Reply
Posted by richard (http://vinyarb.com) on April 29, 2010 at 10:09 am
Hey Guys,

I added your module onto my site. However, the font colour of the name is white, which renders it invisible. Is there any way to change that?

my site is http://vinyarb.com

Cheers Reply
Posted by Max Neuvians on April 29, 2010 at 03:21 pm
Hi Richard,

please make sure your Color Scheme is set to light in the module options. This way fonts should be dark. If it is set to dark then the fonts will be white.

Reply
Posted by NEth (http://arbev.co.il) on April 29, 2010 at 05:55 pm
I hope the code is visible in comments.
I have managed to fix the "Page could not be reached" issue as other solutions did not work for me.
Edit the code in default.php to reflect the following changes:
1)
function CurrentPageURL()
{
$pageURL = $_SERVER['HTTPS'] == 'on' ? 'https://www.yourdomain.com' : 'http://www.yourdomain.com';
$pageURL .= $_SERVER['PHP_SELF'];
return $pageURL;
}

2)replace
($params->get('autourl') == 'yes' ? $url = CurrentPageURL() : $url = $params->get('url'));

with
($params->get('autourl') == 'yes' ? $url = JURI::current() : $url = $params->get('url'));

worked like a charm on my site. Reply
Posted by Max Neuvians on April 29, 2010 at 06:38 pm
Hi Neth,

I am happy it worked out. I used to use JURI::current() in the first version but it caused a problem with other sef modules. I am glad though that it works! Reply
Posted by Sherrie (http://www.minervapromotions.com) on May 03, 2010 at 01:41 pm
How do I adjust this so that it pulls the specific article instead of just the page. I'm trying to use it in a blog section and when you hit "Like" on one article it uses it for all of them. Reply
Posted by Sherrie (http://www.minervapromotions.com) on April 30, 2010 at 06:43 pm
I'm trying to use this in a blog section but it's going off of the whole page instead of specific articles so when someone hits like, they end up liking all articles on that page. How can I call them individually like the tweetmeme service? Reply
Posted by Max Neuvians on May 03, 2010 at 01:42 pm
you will need to use a plugin for that unless you want to create a module position inside your template that is visible on all pages / a certain category. For example the modules on the left hand of this post, "Categories" and "Most Popular" are visible on all pages of the blog category. Reply
Posted by Kristofer on May 04, 2010 at 09:17 am
I get the following error message:

Notice: Undefined index: HTTPS in PATHWAY/modules/mod_vergefacebooklike/tmpl/default.php on line 19

Are all the problems with this module or with Facebook? Reply
Posted by Max Neuvians on May 04, 2010 at 11:52 am
Hi Kristofer,

this means that the server Joomla is running on does not seem to provide the $_SERVER variable and thus an incomparability between the module and your server. To try and fix it you can open default.php, delete lines 19-22 and replace the following line:

($params->get('autourl') == 'yes' ? $url = CurrentPageURL() : $url = $params->get('url'));

with

($params->get('autourl') == 'yes' ? $url = JURI::current() : $url = $params->get('url')); Reply
Posted by Yofie Setiawan (http://http:/www.yopdesign.com) on May 13, 2010 at 06:38 pm
thanks Max Neuvians, your tips really work and help me out... Reply
Posted by Tommaso (http://www.anet.it) on May 05, 2010 at 07:32 am
hi guys,
Thanks very much for this module. Awesome work

i use it on
joomla site with no SEO option, no other facebook plugin = WORKS
(all urls of www.fidasleccese.it

i use it on
joomla site with SEO native option on, with facebook plugin Like Box = WORKS
(just one url to test
http://www.hotelkoine.it/it/lecce-otranto-ed-il-salento/gallipoli-la-c itta-bella )


so, thanks to share this module

Tommaso
from Italy



joomla site with SEO native option on = WORKS
Reply
Posted by Max Neuvians on May 05, 2010 at 02:05 pm
Hi Tommaso!

Thank you for your feedback and support! It is deeply appreciated! Reply
I've installed the module now, but it says "42 persons like this" on every page. It doesn't seem to get that different URL's are unique pages. (See my link for example.) Reply
Posted by Max Neuvians on May 05, 2010 at 02:10 pm
Hi Kristofer,

it seems like the URL is not being discovered correctly. The page that is being sent to facebook is:

http://www.ssu.se/index.php

for every instance of the button on the site. Certain Joomla configurations seem to not be returning the URL correctly. Assuming that you are the same Kristofer from above and are using the JURI::Current() method. It might be that JURI::Current() is having the same problems as our CurrentPageURL() function in determining the URL. Are you using a windows server by any chance?

Reply
Posted by GeneOberto (http://www.swedishgolfonline.com) on May 05, 2010 at 08:30 am
What am I doing wrong?

"Fatal error: Cannot redeclare currentpageurl() (previously declared in /home/goprojec/public_html/swedishgolfonline.com/modules/mod_vergeface booklike/tmpl/default.php:19) in /home/goprojec/public_html/swedishgolfonline.com/modules/mod_vergeface booklike/tmpl/default.php on line 22" Reply
Posted by Max Neuvians on May 05, 2010 at 02:15 pm
Hi GeneOberto,

the problem arises when you use two copies of the module on the same page or another component/module/plugin in Joomla is declaring the same function somewhere else. To change this, either only load the module once per page, or change the name of the name of the function in two places.

Change

function CurrentPageURL()

to

function CurrentPageURLFBLike()

and

($params->get('autourl') == 'yes' ? $url = CurrentPageURL() : $url = $params->get('url'));

to

($params->get('autourl') == 'yes' ? $url = CurrentPageURLFBLike() : $url = $params->get('url'));

in default.php inside the tmpl directory of the module directory in Joomla Reply
Posted by Hascor on May 06, 2010 at 09:41 am
Joomla 1.0.x version would be helpful:) Reply
Posted by Rob on May 06, 2010 at 10:37 am
Hey,

is it possible to place the link in each article? I have a Blog on my Joomla website and i want to able visitors to share an individual Blog post with their friends on facebook.

Im still a bit new tot Joomla so i don't have much technical knowledge.

thanks in advance! Reply
Posted by Max on May 14, 2010 at 08:04 am
I was wondering if i can also use the Meta property="fb:admins" in the header of the template html Joomla page to get the statistic?

Reply
Posted by Max Neuvians on May 14, 2010 at 05:34 pm
Hi Max,

I am not sure what that tag does. I tried to research but a lot of people seem to be confused about what exact effect it has besides declaring the admin of the page. Please give it a try and if something comes around, please let me know. Reply
Posted by Zed on May 14, 2010 at 05:20 pm
Hiya
This is an excellent module, works great for me.. Just a suggestion: like others have said, if this was able to integrate with content, it would have been even more amazing. Really hope you consider this :)

Thanks for a really great module, keep it up! Reply
Posted by Max Neuvians on May 14, 2010 at 05:37 pm
Hi Zed,

thanks for the kind words. Unfortunately we have not had the time to take a look at this yet more than just throwing something basic, and basically underwhelming, together. There is a lot of cool stuff we would like to do with the open graph protocol. I promise you that we will do it, just we don't know when. Reply
Posted by Max on May 15, 2010 at 06:09 am
Is it possible to change the modul for Joomla 1.0.x? What would be important to change?

I still have some running projects build with joomla 1.0.x so that modul would be very cool Reply
Posted by ramesh (http://cluburb.com) on May 18, 2010 at 11:08 am
Hi,

This is an Great module, working well. But when i liked an article it posted only on my wall not my friends. What's Wrong? Reply
Posted by Max Neuvians on May 18, 2010 at 02:03 pm
Hi Ramesh,

I think the intended functionality is only to post to your wall and that people would see that when they are looking at your profile. I don't think it is supposed to post to your activity wall, although I may be wrong. In any case this would be something that facebook has control over. Thanks for your support though! Reply
Posted by Max Webber on May 21, 2010 at 01:44 am
I get an error message on top of a Like button:
Notice: Undefined index: HTTPS in modules/mod_vergefacebooklike/tmpl/default.php on line 19

Any idea whats that about? Reply
Posted by Max Neuvians on May 21, 2010 at 11:59 am
Hi Max,

it means that your installation of php is not providing the data array necessary to read out your url. I believe certain windows servers and very secure set ups will not provide this information.

http://www.php.net/manual/en/reserved.variables.server.php

You can try and use the JURI::Current() method instead by commenting out the whole CurrentPageURL() function and replacing

($params->get('autourl') == 'yes' ? $url = CurrentPageURL() : $url = $params->get('url'));

with

($params->get('autourl') == 'yes' ? $url = JURI::current() : $url = $params->get('url')); Reply
Posted by Max Webber on May 21, 2010 at 08:22 pm
Thanks, will try that. Reply
Posted by mooney101 (http://www.studiobenjamin.com) on May 26, 2010 at 07:38 pm
Is there a way to center it? Reply
Posted by Max Neuvians on May 27, 2010 at 11:49 am
Hi Mooney101,

the module allows you to specify a css class suffix. ex. mooney101 would show a div with class = vergefacebooklikemooney101.

All you need to do is set the css to display however you want for the div. Reply
Posted by mooney101 (http://www.studiobenjamin.com) on May 26, 2010 at 08:07 pm
I've notice if you have more than one instance of this on page you get php error even if its two different modules. Reply
Posted by Max Neuvians on May 27, 2010 at 11:53 am
Hi Mooney101,

yes there is a problem with using the module multiple times on one page.

You can try and use the JURI::Current() method instead by commenting out the whole CurrentPageURL() function and replacing

($params->get('autourl') == 'yes' ? $url = CurrentPageURL() : $url = $params->get('url'));

with

($params->get('autourl') == 'yes' ? $url = JURI::current() : $url = $params->get('url'));

in default.php under the tmpl directory. The most common php error people are getting is that it redeclares CurrentPageURL multiple times.

Also the new plugin we are releasing soon will do away with the need for multiple modules. Reply
Posted by haries (http://www.hariesdesign.com) on May 31, 2010 at 02:40 pm
hey..great simple module.. Reply
Posted by C.Eich (http://lighthouseadgroup.com) on June 01, 2010 at 06:46 pm
any chance you could change the php short tags to the normal in the next release. I don't have them enabled by default on my server and it threw me for a loop to see the iframe pulling in the full facebook page, rather than the like iframe.

Otherwise i love the plugin. simple and effective. Reply
Posted by Johan Strydom (http://namibcoder.org) on June 21, 2010 at 12:36 pm
I agree. Never assume everybody has short_open_tag enabled in their php configurations.

Otherwise. Great job with the module :)

Reply
Posted by Max Neuvians on June 01, 2010 at 06:54 pm
Hi C.Eich,

that is a really good point. We run most of our software on servers we own or were built under our specifications, so I have never even though about differing server configurations. It's a really valid concern! Thank you very much for pointing that out. I will include this in the upcoming open graph componenent/plugin we are working on. Thanks for your support! Reply
Posted by Thomas Dobner (http://www.effektmedia.at) on June 11, 2010 at 06:57 pm
hi guys,
very good module.
I use it on 3 sites

Thomas Reply
Posted by Colin on June 21, 2010 at 12:36 pm
I have been looking for a simple like button all evening, thanks! Reply
Posted by Niki (http://www.newknowledge.dk) on June 23, 2010 at 02:21 pm
Works like a charme!

I could wish for a button Ilike this... can you make that?

Great work!

Reply
Posted by Piero (http://http:://www.armesmoinscheres.com) on June 28, 2010 at 12:15 pm
Thanks Max Neuvians,

Your tips to solve the undefined index problem in line 19 really help me too...

Reagrds,

Pierre Reply
Posted by Bill (http://www.kccurling.com) on July 22, 2010 at 01:02 pm
I notice when you like "use to be become a fan" a business facebook page the information is droped into the news part of you personal profile.

Does the like button on the joomla website page add the new articles for that page on that persons profile just like facebook? Reply
Posted by Max Neuvians on July 22, 2010 at 01:00 pm
Hi Bill,

the like button adds an entry to your wall of your profile. People should then see those in their news feed as new items. At least that is how I think facebook used to do it. I hope it hasn't changed.

-Max Reply
Posted by Joan (http://sbsoluciones.com) on July 25, 2010 at 01:30 pm
Max, when do you finish the pluggin to button like?

thanks in advance we are waiting it, and congratulations for your work

salutations from barcelona (spain) Reply
Posted by Max Neuvians on July 27, 2010 at 01:27 pm
Hi Joan,

I apologize for the delay. We have been so incredibly busy that we have not been able to get one past our quality assurance yet. We, however, have a summer intern who will hopefully be able to complete this project soon.

Thanks for your support.

Max Reply
Posted by Vic on July 31, 2010 at 08:24 pm
Hi there - nice east to use module. Seems to be working pefectly with me with sh404sef, which surprised me after reading the previous comments.

My question is about position - i have reduced the gap below the button, but I think i need a small gap above it. On this page for example http://www.mymusictheory.com/j/grade1/lessons/18-foreign-terms.html it looks like the button is attached to the google adsense box. How can i add some padding to make a gap at the top? Reply
Posted by Max Neuvians on August 02, 2010 at 08:17 pm
Hi Vic,

the like button is enclosed by a div with class "vergefacebooklike", which you can address in your CSS file with the following padding adjustments:

div.vergefacebooklike {padding-top: 5px;}

Just add the above line into your CSS file in your template and you should be good. Reply
Posted by Nancy on August 16, 2010 at 04:39 pm
Hi there,
Love the module for it's simplicity. But I've run into a glitch, when clicking on the button a pop up window loads and then goes back to the original page and then reloads the pop up again continuously. Any idea what could be causing this?
Thank you!
-Nancy Reply
Posted by Max Neuvians on August 20, 2010 at 11:46 am
Hi Nancy,

I have never heard of that before. If you would like you can send me an email max(a.t)vergegraphics.com with the URL in it and I can take a look. Reply
Posted by Jeremy Phillips (http://www.thegenesischristian.com) on August 20, 2010 at 02:06 am
I don't see this solution here, but I was having the problem with the URL error even though my url was valid. It was easily fixed without messing with span spaces, etc by just making sure my page had the required og meta tags. Listed http://developers.facebook.com/docs/reference/plugins/like

I have the meta tags dynamically generated using setMetaData Reply
Posted by Jeremy Phillips (http://www.thegenesischristian.com) on August 20, 2010 at 02:08 am
ugh ok nevermind, it seems to work about 50% of the time... now. Reply
Posted by Max Neuvians on August 20, 2010 at 11:50 am
Hi Jeremy,

We have been working with OG specs for a while. If you look in our page source they are defined for most pages. It is really interesting that they seemed to have caused the problem. Our initial assessment was that is was a problem with the Facebook parser. Do you have the span spaces on your site template? They seem to have fixed all such problems as far as we know.

Reply
Posted by michelle (http://mommiesplayground.com) on August 26, 2010 at 10:01 pm
I've installed the module, but what now, I have a module showing on my site with a like button, but how do I get it to show o articles and how do I link it to my facebook?
Reply
Posted by Bobo on August 30, 2010 at 12:46 pm
Notice: Undefined index: HTTPS in /modules/mod_vergefacebooklike/tmpl/default.php on line 19 Reply
Posted by Max Neuvians on August 30, 2010 at 12:52 pm
Hi Bobo,

most likely your server does not support the php $SERVEr variable. This is ok. If you would like to remove the error message, as it is only a notice and not that important, please add:

error_reporting = E_ALL & ~E_NOTICE

to the top of this file:

/modules/mod_vergeface booklike/tmpl/default.php Reply
Write A Comment
 
Please input the anti-spam code that you can read in the image.