facebook like social plugin not working - facebook

I am trying to use the facebook like plugin which has a like and send button.The source code of my page is as follows-
<html>
<body>
hello
<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=138876406236026";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-send"></div>
</body>
Why is it not working?

it wont work on your local system ,you should put it in your website ,
ex: www.sample.com ,

The facebook social buttons work locally on a computer.When you put them online on your website,they will work :)

Related

comments not showing up - facebook comment box

I simply tried this -
<div class="fb-comments" data-width="700" data-numposts="5" href="https://ec2-52-74-60-140.ap-southeast-1.compute.amazonaws.com/" > </div>
it shows the comment box but none of the comments are displayed if I comment something on it!
Please help.
<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.6&appId=[your appid];
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Do you have this in your code?
https://developers.facebook.com/docs/plugins/comments/
It was a simple network communication error. My AWS instance was not being able to call the FB APIs properly.

Facebook Like-box doesn't work with specific sites

I see a weird kind of fail working with like box... I can't see the like box, but the address looks fine:
<div class="fb-like-box" data-href="http://www.facebook.com/instituto.vannghiespana"
data-width="292" data-height="570" data-show-faces="true"
data-stream="true" data-header="true"></div>
I have tried changing the “http” for “https” and still doesn’t answer. Even when I try to generate the code on like box facebook developers site, the validation says the code is ok, but I still can’t see the site.
But... When I use the older website:
data-href="https://www.facebook.com/pages/Instituto-Van-Nghi-Espa%C3%B1a/133758943312622"
Works fine.
Thanks for your time.
(EDITED)
I already include the facebook sniplet after 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/es_ES/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
even I try changing js.src = "//connect for js.src = "http//connect
Any ideas?
Nacho
The Facebook Like Box plugin is for liking Facebook Pages.
The example you listed, instituto.vannghiespana, is a (fake) profile, not a page.
The like box plugin cannot be used with profiles. If this is your profile you should convert it to a Page (for one thing, a profile can't have more than 5000 friends)
You're forgetting the JavaScript code:
<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={{APP_ID}}";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Look more carefully in the documentation.
do you have the required fb-root html tag:
<div id="fb-root"></div>
as well as the corresponding javascript code?

Cannot get a like Button

i just try to get a like & share button on my website with the code from the generator:
<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/all.js#xfbml=1&appId=278654312150503";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
......
......
<div class="fb-like" data-href="http://wwww.friendsmap.info" data-send="true" data-layout="box_count" data-width="70" data-show-faces="true"></div>
Firebug said to me "Invalid ApplicationID"
But the appID is the same like my facebook developer shows it
What can be wrong ?
Looks good to me, possible problem could be that you activated the sandbox mode in the developer settings. But you do have an error in the URL: http://wwww.friendsmap.info > 4 w´s
Also check the Website URL in the developer settings, maybe you got it wrong there too.

Facebook comment plugin code

I've seen some post up already around the same subject but not really what I wanted to know
But i'm trying to add the facebook comment box plug in, into my site but it doesn't seem to be working, this is the code it has given me
<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&appId=***************";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-comments" data-href="http://www.facebook.com/pages/Cuba-Street/86653690342?fref=ts" data-num-posts="2" data-width="470"></div>
But it just doesn't seem to return anything?
I checked your code without single modification, it works for me

Facebook share and comment boxes don't work together

I want to include Facebook share button and comment box to my website.
I have a code for share button:
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"
type="text/javascript">
</script>
<a name="fb_share" type="icon" share_url="www.example.com"></a>
For comment box:
<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&appId=258471354227171";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-comments" data-href="www.example.com" data-num-posts="3" data-width="600"></div>
Separately it works perfect, but when i put it in one page just one of them is working. What is a problem?
I think the solution you need is here:
Facebook Like button sometimes appears sometimes not
Basically you need to add the FB.share script after all.js.