• Resolved meschiany

    (@meschiany)


    Hey,

    Unfortunately or maybe its fortune, in our wp we are using both core comments of wp and FB social plug in.

    is there a way to sum up the number of FB social plugin with the number of WP comments?

    for example, if 8 comments were made in FB and 3 in WP, the get_comments_number() function will return 11?

    https://wordpress.org/plugins/facebook/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter meschiany

    (@meschiany)

    solved it using <fb:comments-count href=”<?php echo get_option(‘siteurl’); ?>”></fb:comments-count>

    sorry and thanks

    Plugin Contributor Niall Kennedy

    (@niallkennedy)

    <fb:comments-count> is XFBML markup parsed by the Facebook SDK for JavaScript inside your visitors’ browsers. It represents the number of approved comments for the URL passed in the href attribute. You should vary the href attribute on each page to allow the Facebook SDK for JavaScript to display the amount of comments for that specific URL.

    The Facebook plugin for WordPress outputs <fb:comments-count> markup for themes calling comments_number() by overriding the filter.

    If you would like to manually combine the count of WordPress comments and Facebook comments see Facebook_Comments::get_comments_number_filter() for the Facebook Graph API calls needed to return an integer.
    https://github.com/facebook/wordpress/blob/master/social-plugins/class-facebook-comments.php#L90

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘count number of comments’ is closed to new replies.