Not all the comments visible when pulling a post using Facebook graph API iphone

前端 未结 3 1211
执笔经年
执笔经年 2021-01-23 08:49

I searched through all the posts about Facebook graph API and didn\'t find anything about it. Here\'s the issue.

I\'m working on the iPhone app for one company. And for

3条回答
  •  忘了有多久
    2021-01-23 09:27

    The Graph API works in mysterious ways and there's a countless number of bugs actually open, but to make it simple you'll need to pass a valid access_token to retrieve all comments from facebook.

    Meaning https://graph.facebook.com/page_id/feed?access_token=blah

    The API will return a JSON with links to use the pagination. You can use them to browse through or retrieve directly a larger amount of data:

    https://graph.facebook.com/page_id/feed?access_token=blah&limit=1000

    Note that using a limit higher than 1000 will lead to bugs and possible invalid data... that's a known bug. There are also bugs in the pagination logic that might or might not be fixed as of 2011... you'll have to check.

    The comments count and actual count is also buggy and might be off when working on large pages (seen it happen on pages with more than 5k comments per post). There are also some problems with getting the count itself...

    Sorry if I can't help you more than that, but the graph API is still a bit of a mess and counts a fairly high number of bugs. You'll have to try and see if it works as explained in the documentation. But definitively add an access token, it can't hurt and you'll most likely get the data you want... unless you run into a bug.

提交回复
热议问题