I'm trying to get the feeds on a public wall and the associated comments. So every X minutes I'm doing a query in order to get what's new (feeds and comments).
I need the feeds (the new feeds since myDate) and comments (comments posted on the new feeds and comments posted on older feeds). So if someone posted a comment on a older feed I want to get it. I tryied to do this using FQL and Graph API but I don't manage to find the best solution.
With FQL there are some problems (bugs) with LIMIT and OFFSET and does not work very well. With the Graph API I don't have so much power. So this is what I've tryied:
https://graph.facebook.com/PAGE_ID/feed?access_token=MY_ACCES_TOKEN0&limit=500&since=1350033469&until=now&updated_time>1350033469
This gives me the newest post, so no problem because for each one I'm doing a new query in order to get the comments for each feed:
https://graph.facebook.com/PAGE_ID/comment?access_token=MY_ACCES_TOKEN0&limit=500&since=1350033469&until=now&updated_time>1350033469
The problem is that if a comment is posted on a older post, I don't receive it.
Using FQL I cannot filter only the newest posts (based on my since date) and the posts with new comments.
https://api.facebook.com/method/fql.query?query=SELECT post_id, text, fromid FROM comment WHERE post_id IN (SELECT post_id FROM stream where source_id=PAGE_ID and comments.created_date>1350033469)&access_token=MY_ACCES_TOKEN
Using Graph API I have a good pagination (using next and previous links inside the response) but with FQL I did't find any solution.
So anyone have some idea ? Thanks.
C.C.