Paging with FQL - facebook-fql

The graph api returns timestamps for the previous and the next pages for easy paging. How would one accomplish it with the FQL (for reading stream table posts)? Thanks in advance.

You can use limit and offset in FQL.

Related

How can I filter by message in all comments of a page post with graph api facebook?

This post have over 300000 comments and I want to filter which has my key.
I use this api to get all comment, then filter in local, but the maximum comments I receive is 5000.
graph.facebook.com/{post_id}/comments?fields=id&limit=1000000
How can I get all comments without limit (for post page have over million comments)?
Thank
Use a lower limit and use paging instead: https://developers.facebook.com/docs/graph-api/using-graph-api/#paging
You need to be careful with API limits though.

Getting the number of Facebook likes for a URL

I know there are several related answers on SO, but none seem to answer my question.
I would like to know if there is way to get the number of likes for a URL, using Graph API 2.2.
I know how to obtain this info via FQL or REST API, but those are deprecated.
https://graph.facebook.com/?ids=some_url
This returns the number of "shares", which is a total of like + shares + whatever. I need only the number of likes.
https://graph.facebook.com/some_opengraph_id/likes?summary=true
This returns the number of likes, but that total seems to be much lower than what a query on FQL link_stat table would return. Also /likes returns a list of likes, but it doesn't seem to be a complete list.
So is it possible to do this via Graph API or only FQL / REST support this?
Thanks in advance!
I encountered the same behavior, but unfortunately afaik there are no other options currently. If you have a v2.0 app, you can continue to use FQL until August 7th, 2016.

Facebook : how can we maximize post Count from a particular source_id?

For now I am using the FQL to fetch facebook post from a particular source_id,
fql : SELECT post_id,message FROM stream where source_id="21540067693"
it is giving only 20 result.
Is there a way to maximize the no. of post in result ?
well I get a solution with graph api by myself, I am posting it may be it will be helpful for someone
https://graph.facebook.com/[***page_id***]/posts?access_token=[******]&limit=1000

Is it possible to know how many urls are totally shared on Facebook by querying the link_stat table?

Is it possible to know how many urls are totally shared on Facebook by querying the link_stat table?
I haven't found a way to do so because of the restrictions of FQL.
No, this is not possible because of several things:
list_stats table have url as indexable field, so you need to know exact URLs to get results
there is no aggregation function in FQL which can count rows (like COUNT() in SQL)

How to get the "shares" of a wall post with FQL

I can't find them in the "stream" table, nor if with a "link_stat" query... any solutions ?
I think there is no such table (like the "like" table) in fql,but if you want to query the share count, you can retrieve it from the graph api without fql (see here for a share count example). Unfortunately, there seems to be no option yet to get the user or user-ids who shared a facebook object, just the share-count. Correct me if i´m wrong..
You can get them via "link_stat" table.
https://developers.facebook.com/docs/reference/fql/link_stat/