Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring社交推特-排除转发_Spring_Spring Social Twitter - Fatal编程技术网

Spring社交推特-排除转发

Spring社交推特-排除转发,spring,spring-social-twitter,Spring,Spring Social Twitter,在Spring社交推特中有没有一种方法可以搜索推特,但不包括转发?目前我使用的是类似这样的search方法,但我发现——当然——也有转发的tweet twitter.searchOperations().search('stackoverflow', 100) 关于搜索推文时,目前不可能排除转发。尽管如此,我还是忽略了Spring模型类org.springframework.social.twitter.api.Tweet。是该类上的一个属性,可用于筛选结果。回答可能有点晚,但实际上现在可以从

在Spring社交推特中有没有一种方法可以搜索推特,但不包括转发?目前我使用的是类似这样的
search
方法,但我发现——当然——也有转发的tweet

twitter.searchOperations().search('stackoverflow', 100)

关于搜索推文时,目前不可能排除转发。尽管如此,我还是忽略了Spring模型类
org.springframework.social.twitter.api.Tweet
。是该类上的一个属性,可用于筛选结果。

回答可能有点晚,但实际上现在可以从搜索结果中筛选出转发

  "puppy -filter:retweets"  containing “puppy”, filtering out retweets
因此,在上面使用SpringSocial的情况下,您只需将查询更改为

  twitter.searchOperations().search('stackoverflow -filter:retweets', 100)
这将返回所有包含stackoverflow的tweet,并过滤掉转发

您可以检查所有标准(免费)API