I’m trying to get all post messages using restfb, my code is as follows
public Connection<Post> publicSearchMessages(Date fromDate, Date toDate) {
Connection<Post> messages = publicFbClient.fetchConnection("search",
Post.class,
Parameter.with("q", "Watermelon"),
Parameter.with("since", fromDate),
Parameter.with("until", toDate),
Parameter.with("type", "post"));
return messages;
}
This only gives latest 25 post messages.
Parameter.with(“limit”,100 )
If i set limit parameter, it gives 100 messages but i don’t want to limit to fetching post messages. So,
Is there anyway I can get a full list of post messages matching the search criteria without setting limit parameter?
There is no way to fetch unlimited results from FB. The default limit is set to 25. As you know, you can change this using the
limitparameter. I have not found an upper border for limit searching the web. Maybe, you can set it to a very high amount.