WordPress.org

Forums

Social
not more than 25 FB Comments (5 posts)

  1. deraleks
    Member
    Posted 1 year ago #

    Hi,

    first - this plugin is great.

    Yesterday i share a post to FB and on FB the post has 64 Comments.

    But the Plugin pulls only 25 Comments in my Blog? Any Ideas? With any manualy agregition he finds only the 25 imported comments but no new comments...

    Thanx and Cheers
    Alex

    https://wordpress.org/plugins/social/

  2. fergbrain
    Member
    Posted 1 year ago #

    @deraleks: I can confirm this issue as well (Social v2.11, WP v3.9.1).

    I think the issue may have to do with Facebook depreciating API v1.0 in favor of v2.0.

    Anyway, it looks like the aggregate_by_api function (in lib/social/service/facebook.php) doesn't pass an explicit limit function, which means that Facebook defaults to a limit of 25 (http://stackoverflow.com/questions/14876105/the-limit-of-facebooks-graph-api-limit-parameter
    ). It also doesn't look like the aggregation function does any paging for comments (there is some paging support for "Likes")

    For posts where there are more than 25 comments, there is a "paging" and "next" field that should be followed:

    "paging": {
        "cursors": {
          "after": "MjU=",
          "before": "MQ=="
        },
        "next": "https://graph.facebook.com/v1.0/{FB_POST_ID}/comments?fields=parent,message,from,created_time,can_comment&filter=stream&limit=25&after=MjU="

    Adding 'limit'=>'100' to the end of the array in line 255 of lib/social/service/facebook.php seems to provide an interim solution (at least up to 100 comments):

    $request = $this->request($account, $broadcasted_id.'/comments', array('filter' => 'stream', 'fields' => 'parent,message,from,created_time,can_comment', 'limit'=>'100'));

  3. Alex King
    Member
    Plugin Author

    Posted 1 year ago #

    A pull request would be awesome!

    https://github.com/crowdfavorite/wp-social

  4. fergbrain
    Member
    Posted 1 year ago #

    Deal...I work on it when I get to my normal computer.

  5. fergbrain
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Social
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.