Mobile app version of vmapp.org
Login or Join
Barnes591

: Facebook like button count I just created a simple webpage where people can browse funny photos and share it with their friends. But I'm having problems with the Facebook like button. I have

@Barnes591

Posted in: #Facebook

I just created a simple webpage where people can browse funny photos and share it with their friends.

But I'm having problems with the Facebook like button. I have used the Facebook like button before on a static URL with iframe. And that seemed to work fine.

I'mm using the XFBML version and not the iframe version because the iframe version affects the pages layout.

This is the code I got from Facebook:

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="" send="false" layout="button_count" width="450" show_faces="false" font="tahoma"></fb:like>


Facebook says that "href - the URL to like. The XFBML version defaults to the current page. " So i left that one open.

Problem:

When users click Like the counter won't update. It still shows nothing as if no one ever clicked the button.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Barnes591

3 Comments

Sorted by latest first Latest Oldest Best

 

@Cugini213

href is a means to add your site or page as a link to the code.
It is generally put in a format with an open and closed <a> tag as follows:

<a href="">Your Web or Facebook page</a>


This code will help link your likes, but needs the href link to know what it is linking.
So, removing the href is not the answer - and this code alone is not the answer:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">


The two must be combined.

10% popularity Vote Up Vote Down


 

@Carla537

Your problem might be with the Javascript SDK.

According to FB, it's needed for rendering XFBML plugins. It looks as if you need to register, too.
developers.facebook.com/docs/reference/javascript/
Also, according to the same page,


In order to use XFBML on your webpage,
you must add an XML namespace
attribute to the root element
of your page. Without this
declaration, XFBML tags will not
render in Internet Explorer.


<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">

10% popularity Vote Up Vote Down


 

@Pope3001725

Try removing the href attribute altogethr:

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like send="false" layout="button_count" width="450" show_faces="false" font="tahoma"></fb:like>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme