Ihor Davydiuk
Ihor Davydiuk

Reputation: 1

Display of a window with scrolling of an entrance of Facebook after pressing of the "Like" button

I have posted on the website the Like button from Facebook. I am using Facebook’s JavaScript SDK in an application. If the user isn't logged into FB, I get the following window with horizontal and vertical scrollbars:

enter image description here

Confuses only this window with scrollings. And if I add instead of URL on my group, other URL (for example on the website of Facebook), then the entrance window without scrollings is displayed

enter image description here

Attach the JS SDK code which I add

<script> window.fbAsyncInit =
                 function () {
                     FB.init({ appId: "1111111111111111", xfbml: true, version: "v2.12" }), FB.AppEvents.logPageView();
                 },

                    (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 = 'https://connect.facebook.net/ru_RU/sdk.js#xfbml=1&version=v2.12';
               fjs.parentNode.insertBefore(js, fjs);
         }(document, 'script', 'facebook-jssdk'));

</script>

And code of the button

<div class="fb-like" data-href="https://www.facebook.com/my-group-name" data-layout="button_count" data-action="like" data-size="small" data-show-faces="false" data-share="false"></div>

All this is done by me locally in the development mode. How it is possible to make that the window is opened without scrollbars or opened in a new tab?

Upvotes: 0

Views: 58

Answers (1)

window.fbAsyncInit = function () {
    FB.init({
        appId: "1111111111111111",
        xfbml: true,
        version: "v2.12"
    }), FB.AppEvents.logPageView();
}, (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 = 'https://connect.facebook.net/ru_RU/sdk.js#xfbml=1&version=v2.12';
    fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

Upvotes: 0

Related Questions