Here is code for like box we need to add comment box and like box in each post...
<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/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like-box" data-href="http://www.facebook.com/OneLife4Live" data-width="600" data-height="400" data-colorscheme="light" data-show-faces="false" data-header="flase" data-stream="true" data-show-border="true">
</div>
you keep logged in facebook on another tab.
you will get Likebox and commentbox directly when you facebook logged in browser.
Related
I want to add a like button to my website but I'm having trouble doing so.
After some research I found this code that has to be right after the opening body tag:
<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/en_GB/sdk.js#xfbml=1&version=v2.9";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
and with it comes this code that goes where I want my like button in the page:
<div class="fb-like"
data-href="http://www.facebook.com/curlybracketssarl"
data-width="200" data-layout="standard" data-action="like"
data-size="small" data-show-faces="true" data-share="false"></div>
Yet nothing is showing, I even tried to do so in a blank page and got no results once again.
So can you kindly tell me how to do what I need to do?
i want to integrate a fb like box in a smarty tpl file. At this time only the iframe solution works fine, but there is no language support and that's why I want to use the new solution for the box.
The following code does not render the box in the tpl:
<div class="fb-page" data-href="https://www.facebook.com/myfbpage"
data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true" data-show-posts="true">
<div class="fb-xfbml-parse-ignore">
<blockquote cite="https://www.facebook.com/myfbpage">
My Facebook Page</blockquote>
</div></div>
Is there a solution?
The Language of the Facebook Page Plugin is defined by the version of the Facebook JS-SDK that is loaded on your page
<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/de_DE/sdk.js#xfbml=1&version=v2.5&appId=119010228291102";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
This will render the Page Plugin in German and
<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/en_US/sdk.js#xfbml=1&version=v2.5&appId=119010228291102";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Will render it in english.
Just replace the locale in the URI to the locale you want to use on this page.
i'm terribly stacked into this silly situation where i cannot make the standard Facebook Like Button plugin to work.
I'm using the default code that Facebook suggests with no luck:
<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/en_US/sdk.js#xfbml=1&appId=189637597750754&version=v2.3";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
and have the classic elements as well:
<div class="fb-like" data-href="https://developers.facebook.com/docs/plugins/" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
Here is a demo
I really cannot figure out what is wrong with it.
I am trying to make a plugin in my website just like this one :
I am using this code. It includes the script :
<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/en_GB/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
and this :
<div class="fb-like" data-href="htpp://www.my-site.com/" data-width="600" data-height="30" data-colorscheme="light" data-layout="standard" data-action="like" data-show-faces="true" data-send="true"></div>
but nothing shows up. Do I have to use css or a js link included in my page to make it work?
I think you are missing the appId. Make sure to create a Facebook application and connect it with your plugin.
I have problem using facebook like on my page.
If i login on facebook, this the picture:
As you can see, picture showing 8 item, and there say 7 people. The real condition is just only 6 people.
This the other picture if i not logged on facebook:
<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/en_US/all.js#xfbml=1&appId=25399293xxx";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="fb-like-box" data-href="http://www.facebook.com/apps/application.php?id=253992937944977" data-width="272" data-show-faces="true" data-stream="false" data-header="false"></div>
Any ideas? how can I fix this?