I
I
iamsaint2012-05-05 09:53:39
PHP
iamsaint, 2012-05-05 09:53:39

How to install Like button from Facebook?

Good afternoon.
Please help me figure out how to install the Like button from Facebook.
The documentation says that the button is set as follows

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <meta property="og:title" content="Тест заголовка" />
        <meta property="og:type" content="" />
        <meta property="og:url" content="http://www.имя_сайта.com/news/show/id/235" />
        <meta property="og:image" content="http://www.имя_сайта.com/img/news/235/йа_картинко.jpg" />
        <meta property="og:site_name" content="Имя сайта" />
        <meta property="fb:admins" content="циферки" />

        <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/ru_RU/all.js#xfbml=1";
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));</script>
    </head>
    <body>
        <div class="fb-like" data-href="http://www.имя_сайта.com/news/show/id/235" data-send="false" data-layout="button_count" data-width="450" data-show-faces="true"></div>
    </body>
</html>


At the same time, when clicking on the like button, we get the following:
image

Although according to the documentation we should get:
image
Am I doing something wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hell, 2012-05-05
@hell

namespace must be specified in html.
sort of something like this
<html xmlns:og="http://ogp.me/ns#">

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question