1

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)
saw303
  • 8,051
  • 7
  • 50
  • 90

2 Answers2

2

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.

shriidhar
  • 427
  • 3
  • 15
0

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.

saw303
  • 8,051
  • 7
  • 50
  • 90