Facebook Graph API {id}/feed?limit=x - restrict to messages since a certain message id

I have a small problem, I am working on an aggregation application that is collecting messages from pages in realtime.

This is working fine, but I get the same message on every call and then filter out the messages that I have already seen manually.

This means that a large amount of data is being transferred every time I make a call to the graph api.

Is there a way to limit the message as messages since this message id?

currently using the c# Facebook SDK

        var fb = new FacebookClient("access_token");
        dynamic parameters = new ExpandoObject();
        parameters.limit = _facebookMessagesToRetrieveAtATime.ToString(CultureInfo.InvariantCulture);

        //Want to add a new param here to say messages since this id.

        var facebookUrl = String.Format("{0}/feed", "Page ID");
        dynamic resp = fb.Get(facebookUrl, parameters);

Thanks in advance.


You can use the since url parameter in your calls, as described at https://developers.facebook.com/docs/graph-api/using-graph-api/v2.1#paging

This would make it necessary that you store somewhere in your application the timestamp when you last requested the respective feed

This would yield in

var facebookUrl = String.Format("{0}/feed?since={last_update_timestamp}", "Page ID"); 

where {last_update_timestamp} is the timestamp (unixtime in seconds) of the last update.

Need Your Help

How would I list the data from an SQL query in Java?

java sql arrays jdbc

Here is my code, it does get data and paste it in the Text Area as I want it to do, I was just wondering if I could change it so that I could edit how it gets outputted, and add line breaks etc?

How to consume a SOAP web service in a Mule Flow?

web-services soap jax-ws cxf mule

I am beginning with Mule flows and have seen the I have seen this page http://www.mulesoft.org/documentation/display/MULE3CONCEPTS/Using+Mule+with+Web+Services and

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.