Is there a way in Spring Social Twitter to search for tweets but exclude retweets? Currently I use the search
method like this but I finds - of course - also retweeted tweets.
twitter.searchOperations().search('stackoverflow', 100)
Is there a way in Spring Social Twitter to search for tweets but exclude retweets? Currently I use the search
method like this but I finds - of course - also retweeted tweets.
twitter.searchOperations().search('stackoverflow', 100)
May be little late to answer, but its actually now possible to filter out the retweets from search results.
"puppy -filter:retweets" containing “puppy”, filtering out retweets
So, in above case with Spring Social, you can just change the query to
twitter.searchOperations().search('stackoverflow -filter:retweets', 100)
This would return all tweets containing stackoverflow
, and filter out retweets.
You can check all search operators for standard(Free) API.
Regarding to the Twitters API 1.1 it's currently not possible to exclude retweets when searching for tweets. Nevertheless I have overlook Spring model class org.springframework.social.twitter.api.Tweet
for a tweet. The is a property retweet
on that class that can be use to filter the result.