vendredi 10 avril 2015

Spring-Social facebook using PagingParameters and page count

I'm using spring-social for facebook, <version>2.0.0.RC1</version> I have some problem using PagingParameters, I want to read all feed using pages.


this is the code:



PagedList<Post> page1;
try {
page1 = facebook.feedOperations().getFeed(new PagingParameters(50,0,null,null ));
logger.info("* * * * * * * * * * * * * Page_size: " + page1.size());
while (page1.size() > 0) {
...
PagingParameters p = page1.getNextPage();//
page1 = facebook.feedOperations().getFeed(p);
}
} catch (Exception e) {
e.printStackTrace();
}


In this version seems work correctly (since the current stable version it dosen't work corretly).


Well, if I want to start read feed using form a date I have always a page.size()= 0;


I'm using "since" date as:



page1 = facebook.feedOperations().getFeed(new PagingParameters(50,0,myJavaDateTime.getTime(),new Date().getTime()));


I didn't find the way to set the date. How can I use the "since" date?


Thank you, any help is appreciated.


Aucun commentaire:

Enregistrer un commentaire