当前位置: 动力学知识库 > 问答 > 编程问答 >

facebook - Not able to pull more than 100 comments per post

问题描述:

We are trying to get the data from facebook. When trying to get all the comments using the fql query facebook is returning less than 100 comments per post.

Following is the fql query used.

SELECT text,id

FROM comment

WHERE post_id in (select post_id from stream where source_id=**** and actor_id = ****)

also tried

SELECT text,id FROM comment WHERE post_id = ****

Please help me solve the problem. Thanks in advance

note : both source_id and actor_id are same. and post_is mentioned has more than 100 comments (180) and is returning only 99 comments

网友答案:

Use fql query with limit. It will work.

网友答案:

Please note that fql is deprecated from graph api version 2.1 onwards

https://graph.facebook.com/v2.3/post-id?fields=comments&access_token=ACCESS_TOKEN gives you all the comments of that post with paging.

https://graph.facebook.com/v2.3/post-id?fields=comments.summary(true)&access_token=ACCESS_TOKEN will give you all the comments of that post with paging and also using "comments.summary(true)" gives you "summary" json object along with data and paging which gives you total comments count also.

分享给朋友:
您可能感兴趣的文章:
随机阅读: