0
votes

i do this many times before. Tonight I have a problem with displaying a button on the site. The button not displayed on the local server and the web server I do not know why?

What i do:

1: https://developers.facebook.com/docs/plugins/like-box-for-pages

2: In Facebook Page URL field i put my page url (https://www.facebook.com/MYFBPage)

3: Width : 200

4: Height: 200

And press Get Code, i take HTML5 tab first time:

In my body i put code F:

<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">
    </head>
    <body>
    <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/sr_RS/all.js#xfbml=1";
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));</script>

       <div class="fb-like" data-href="https://www.facebook.com/MYFBPage" data-width="200" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>    </body>
</html>

I just get a blank page. Whay? I include JavaScript SDK but not work?

1

1 Answers

0
votes

I have copy pasted your code here : http://jsfiddle.net/Ag8hY/ and I am able to see the like button. Although the language is not english.

Check if you can also see. Try with the iframe version first.

<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&amp;width&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;share=true&amp;height=80&amp;appId=154961808500" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:80px;" allowTransparency="true"></iframe>