You can use the
|
character for OR (e.gapple | oranges
)Graph API always returns the latest results first, there are no parameters to control that. To work around this you could implement a Comparator that compares the
Post
class by time and sort the resultList
using Collections.html#sort(java.util.List, java.util.Comparator)
Forward search RestFB
-
14-01-2022 - |
Pregunta
I am using RestFB to search multiple terms on Facebook. I am using following code to achieve that.
Connection<Post> publicSearch = publicOnlyFacebookClient
.fetchConnection(
"search",
Post.class,
Parameter.with("since",
DateFormatter.stringToDate("2013-01-01")),
Parameter.with("q", "apple OR oranges"),
Parameter.with("type", "post"));
I have two questions.
- Is this the correct way of using OR
- I observed, even when I have mentioned "since" I get results in decreasing order in timestamp. The results start from NOW and go backwords. Is there a method to start getting methods in forward manner (something like twitter streaming API)?
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow