• Hi,

    i use the following Code in my functions.php

    function my_comments_popup_link($zero, $one, $more) {
     if ( function_exists('fbComments_combineCommentCounts') ) {
    
     	global $wp_query;
     	$postId = $wp_query->post->ID; 
    
     	$xid = get_option('fbComments_xid') . "_post$postId";
     	$fbCommentCount = get_option("fbComments_commentCount_$xid");
      $num_comments = $fbCommentCount + get_comments_number();
    
     } else {

    The Problem:
    If i enable the new v2 then comment caching is not working.
    It only works with v1 Style.
    Hope this will be fixed.

    Ragards

    https://www.ads-software.com/extend/plugins/facebook-comments-for-wordpress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor .shaun

    (@shaun-1)

    Comment caching will only work with one of these options: “v1 only”, “new”, or “v1 and v2”.

    This is because if you use the new v2 alone, the comments aren’t imported into the v1 system. Thus there’s no way (currently) to retrieve v2 comments via any api. And threaded replies aren’t counted no matter (which is the same behavior facebook themselves uses; but I don’t like it).

    Also, you should change all get_option('fbComments_XX') to, $arr = get_option('fbComments'); and use $arr['XX']; when you need the value. Currently your code will still work (however if you change your xid it will still retrieve the old one), but in the future it will be removed, and using an array should be slightly faster (or a lot, if you’re calling something for every post).

    Hi!, some post of my blog say “comments closed” and the comments is not closed, in another post all is ok. wha is the problem with this?

    And i have this error when activate the desboard comments in the back admin

    Fatal error: Cannot use object of type WP_Error as array in /xxxxxx/xxxxxx/xxxxxxx/wp-content/plugins/facebook-comments-for-wordpress/facebook-comments-admin.php on line 71

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Facebook Comments for WordPress] Comment Count Caching in v2 don't work’ is closed to new replies.