Facebook Like Button not working

I'm developing a website that requires Events Management with Google maps support. As I didn't find anything that could fill my requirements in this site, I was forced to use the "Events Manager" plugin from other site. Nevertheless, when I add a Facebook Like Button (http://sacv.web44.net/eventsview/event/la-arrolladora-banda-el-limon/, this is just a test site) to the single event page, and click on the like link, and after being confirmed, when I check the link on my Facebook profile page the link to the event page, this is incorrect (http://sacv.web44.net/eventsview), where the last part of the url is missing. However, if I copy the link directly in my Facebook wall, it takes the right url and the right info.

I also used the default permalink structure instead, and the same problem happened.

I check the source code of the plugin and they use is own database table to save the data, and hook some functions to template_redirect to show the info of the single event depending on the url.

My question is, what might cause Facebook not to take the full URL with the Like Button?

  • DavidM
    • DEV MAN’s Mascot

    Hi alejandrorecio,

    Would the Facebook Like button be something you're manually adding in yourself? Or is it something the events plugin provides for? Maybe an additional Facebook Like plugin?

    With a bit more detail, I'm sure we can get this sorted rather easily.

    I'd also like to mention as something relevant, we've got a new Facebook plugin on the way and it's currently available as a beta in the following thread.

    If you were using a plugin for the Like button, perhaps this one will work for ya!

    Also of interest, please do feel welcomed to jump into the discussion in the following thread where we're gaging community support for a possible events plugin!


  • alejandrorecio
    • WPMU DEV Initiate

    Hi David, thanks for your information. I am adding the Facebook like button manually and look something like this on my code:

    <div id="fb-root"></div>
    <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
    <fb:like href="<?php echo $event_url; ?>" send="true" width="445" show_faces="false" font=""></fb:like>

    The $event_url var contains the absolute path to a single event (i.e. http://sacv.web44.net/eventsview/event/la-arrolladora-banda-el-limon/). On the user's browser DOM will look something like this:

    <div id="fb-root"></div>
    <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
    <fb:like target="_blank" href="http://sacv.web44.net/eventsview/event/la-arrolladora-banda-el-limon/" send="true" width="445" show_faces="false" font="" class=" fb_edge_widget_with_comment fb_iframe_widget"><span><iframe id="f2f5a17f24" name="f2e6bc5e14" scrolling="no" style="border-width: initial; border-color: initial; overflow-x: hidden; overflow-y: hidden; width: 445px; border-width: initial; border-color: initial; height: 29px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; " title="Like this content on Facebook." class="fb_ltr" src="http://www.facebook.com/plugins/like.php?channel_url=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D2%23cb%3Df3d2c0bfac%26origin%3Dhttp%253A%252F%252Fsacv.web44.net%252Ff3a673926c%26relation%3Dparent.parent%26transport%3Dpostmessage&href=http%3A%2F%2Fsacv.web44.net%2Feventsview%2Fevent%2Fla-arrolladora-banda-el-limon%2F&layout=standard&locale=en_US&node_type=link&sdk=joey&send=true&show_faces=false&width=445"></iframe></span></fb:like>

    The reason why I don't use a plugin for this case, is because the events generated by this plugin are not saved on the wp_posts but on other table, so I can't access the info through The Loop. I check the source code of the plugin and I realize that they have some function attached to the template_redirect hook in order to show the info of the event.

    Please be aware that I have already used this code on other part of the site where I use Post Types instead and it works perfect.

    Thanks in advance,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.