getting just the count
-
Instructions are within the plugin homepage
On the plugin homepage it says to add count=”on”, but that adds the number to the FB comments.
That wasn’t what I wanted.
My question is – can I get back just the number of the comments (without displaying the comments)?
Thanks
You should actually insert the HTML directly like so:
<span class="fb-comments-count" data-href="http://example.com/"></span>I tried
<span class="fb-comments-count" data-href="<?php the_permalink(); ?>"></span>but getting a consistent 0 – even when there are comments.
The outcome is (e.g.):
<span class="fb-comments-count fb_comments_count_zero" data-href="http://breaking911.com/fifa-gave-lots-of-money-to-the-clinton-foundation/" fb-xfbml-state="rendered" data-iceapw="1" data-iceapc="1"><span class="fb_comments_count" data-iceapw="1">0</span></span>Note the fb_comments_count_zero class that was added. Why is that?
Thanks
Your code is correct. However, I entered the URL manually here:
https://developers.facebook.com/docs/plugins/commentsand it should me 0 comments. I then commented and see 1 comment (mine):
http://www.mgb-restauratie.nl/rotatiebrug-aangeschaft/?fb_comment_id=295178973939783_295548673902813I see what your saying.
I did now the same, and the number grew.
But when I went to the actual page – the comments did not appear.
Also – adding a FB comment on the page (via the FB plugin) – did not affect the count.
What’s happening?Thanks
If I go to http://www.mgb-restauratie.nl/rotatiebrug-aangeschaft/ all I see is the comment I made before. It works a it should. What am I missing?
There’s 3 comments that I just put in.
but on the homepage link (on http://breaking911.com/ right sidebar – 70-Year-Old Woman Shoots at Police Robot During Standoff) it says 2 comments (which I put in yesterday on https://developers.facebook.com/docs/plugins/comments …)
<span class=”fb-comments-count” data-href=”http://breaking911.com/elderly-woman-arrested-after-22-hour-standoff-shooting-at-police-robot/”></span>
Here’s another one:
http://breaking911.com/breaking-atlanta-city-hall-evacuated/
On the page there’s one FB comment.When I go to: https://developers.facebook.com/docs/plugins/comments
and enter that link, no comment comes up.I see 2 comments on the first link and 1 on the second, which correlates to what the official FB Comments page says.
The topic ‘getting just the count’ is closed to new replies.
(@akehat)
10 years, 9 months ago
I want to get just the count of FB comments. How do I get it?
Thanks
https://wordpress.org/plugins/facebook-comments-plugin/