Skuli
Skuli

Reputation: 2067

Facebook like buttons sometimes don't work

I am a newbie in Facebook programming. This is how I put like buttons on a single page:

<html>
    <head>
        <script src="http://connect.facebook.net/en_US/all.js ></script>
    </head>
    <body>
        <div>
            <a href='@site1.Url'>@site1.Title</<a>
            <fb:like href="site1.Url"></fb:like>
        </div>
        <div>
            <a href='@site2.Url'>@site2.Title</<a>
            <fb:like href="@site2.Url"></fb:like>
        </div>
    </body>
</html>

The like buttons appear and all looks good. But sometimes I can't actually like. Do you know what the problem is?

Upvotes: 1

Views: 1090

Answers (1)

ifaour
ifaour

Reputation: 38135

Try this instead:

<html>
    <head>
    </head>
    <body>
        <div>
            <a href='@site1.Url'>@site1.Title</<a>
            <fb:like href="@site1.Url"></fb:like>
        </div>
        <div>
            <a href='@site2.Url'>@site2.Title</<a>
            <fb:like href="@site2.Url"></fb:like>
        </div>
        <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
    </body>
</html>

Upvotes: 1

Related Questions