Facebook share and like buttons stopped counting - facebook

I have share buttons on every article on my page which just stopped counting shares since yesterday.
Pages gets normally shared on facebook, but share counter does not get incremented.
Old posts are displaying correct counts, but any new share is not accounted.
Code for my share button is generated on their page
https://developers.facebook.com/docs/plugins/share-button
and it looks like this:
<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.9&appId=APPID";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-share-button" data-href="URL" data-layout="button_count" data-size="small" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=URL&src=sdkpreparse">Share</a></div>
Am I doing something wrong, or facebook went nuts?
EDIT:
Social button increments properly if there is 1 or more share on it (older articles). Ones with 0 shares are shared properly, but not counted/incremented.

It was an issue with facebook itself.
I've reported it and their developers have resolved it.

Related

Can't get the Facebook comment moderation to work

I have implemented the Facebook comments plugin to a page on my site. In addition to this I would like to be bale to moderate the comments. I followed the instructions on the Facebook developer section and implemented as described. I wanted to use the inline moderation tool rather than create an app. So I placed the following meta data.
<meta property="fb:admins" content="533551342"/>
Where the content is set to my Facebook profile ID.
I have then placed the script code as per Facebook developer instructions.
<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&appId=672941899483225&version=v2.3";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
Once that is in place, I added the comments section to the site using the code instructed.
<div class="fb-comments" data-href="http://www.microspot.com/case-studies/boat_design.htm" data-width="540" data-numposts="10" data-colorscheme="light"></div>
So with all this in place the comments section shows and works, but the moderate link does not appear next to the number of posts text (which is what should happen according to face books documentation).
The web page is http://www.microspot.com/case-studies/boat_design.htm
Thanks in advance.
It seems the issue was not with the code but with Facebook re-indexing my changes. There is a tool on the Facebook developer page for debugging and indexing your changes.
Any update you make to the Facebook code on your webpage, especially the meta data, you should always use the following debug tool.
https://developers.facebook.com/tools/debug/
Simply paste your webpage link (should be a live page not local) into the box and follow the instructions each time you make a change.
<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&appId=672941899483225&version=v2.3";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>

Where does app_id in facebook's sharer.php come from?

I am using facebooks's share button, exactly as specified in https://developers.facebook.com/docs/plugins/share-button/.
I tried the HTML5 and XFBML versions, but both generate the link below, which returns http error 500 when the user submits. If I manually remove the app_id parameter (which I did not inform anywhere), it works perfectly.
https://www.facebook.com/sharer/sharer.php?app_id=309437425817038&sdk=joey&u=http%3A%2F%2Fg1.globo.com%2Feconomia%2Fnoticia%2F2014%2F05%2Fministro-da-fazenda-diz-que-nao-vai-faltar-energia-no-pais.html&display=popup
I am using this from my company's intranet, to share a link from the company's external website.
This is my code:
<!-- 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/pt_BR/sdk.js#xfbml=1&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<fb:share-button href="<SHARED_URL>" type="button_count"></fb:share-button>
<!-- <div class="fb-share-button" data-href="<SHARED_URL>" data-type="button_count"></div>-->
So where does this app_id comes from? How do I get rid of it? I want to use the button with the share count, therefore I wouldn't like to call sharer.php directly.

Like a specific post of the timeline of a Facebook page from an external website

I've some trouble with the Like Button. I would like to like a specific post like this one from a external website but it doesn't work:
https://www.facebook.com/236086869778323/posts/597301643656842
For this button I used the following code, which is given by Facebook Developers
<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";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-href="https://www.facebook.com/236086869778323/posts/597302473656759" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
When you read the documentation about the Like Button it states
A single click on the Like button will 'like' pieces of content on the web and share them on Facebook. You can also display a Share button next to the Like button to let people add a personal message and customize who they share with.
These pieces of content are external. That is the Like Button is intended to be used for webpages outside of Facebook to share in Facebook.
You will need to use Embedded Posts instead https://developers.facebook.com/docs/plugins/embedded-posts/

Facebook like button not showing like count [firefox]

I have a facebook like button in my blog using html5 but it doesn't display the count for visitors who didn't like. When someone hits the button, it displays 1 like (even though I tested with multiple facebook users liking it. (the like works, and it does appear on facebook.com)
tested in 3 different browsers.
this is the code I used:
<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=xxxxxxxx";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div style="float: left;margin-left: 40px;" class="fb-like" data-href="http://www.xxxxxx.com/?p=<?php the_ID(); ?>" data-send="false" data-layout="button_count" data-width="100" data-show-faces="true" data-font="segoe ui"></div>
EDIT: I think the problem is with firefox. when i like the page from firefox - doesn't show in other browsers. when i like from chrome or safari - shows in all except firefox.
I had the same issue, but what I figured out is, its because of caching of FB as when I like anything from Firefox then at the same time it dosent shows the count, but next day you will see all the shares and like. Am on wordpress.

Facebook Like button_count not working unless logged in

I have added the Facebook button "LIKE" code below:
<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" data-href="https://www.facebook.com/mypageinfacebook?sk=myappId" data-send="false" data-layout="button_count" data-width="21" data-show-faces="true"></div>
But the like count is not seen on my site, it could be seen only after login in to Facebook account.
How to fix it?
your code wise no wrong..,
Check your data-href link has valid one,
data-href="https://www.facebook.com/mypageinfacebook?sk=myappId"
i tried this code with my fans page url its shown the like counts perfectly..
otherwise,
the page which users wants to like might having '0' likes.
if that case means count wont show.
I think you better to use this one this reference is working..
http://developers.facebook.com/docs/reference/plugins/like-box/
Posting this response for other users that come across this post.
"It seems you are using restriction on "minimum age" or "country" on your page.
That mean facebook can't display a like box, without knowing who is connected, because he can't know the age or the country of the current user."
All credit to AHWEBDEV
Link