Reputation: 1
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:
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
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
Reputation: 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