Spring社交Twitter搜索不会返回任何推文

Spring社交Twitter搜索不会返回任何推文,spring,twitter,spring-social,twitter-search,Spring,Twitter,Spring Social,Twitter Search,我正在使用SpringSocial进行twitter搜索。在我的控制器中,我有: @RequestMapping(value="/twitter/search", method=RequestMethod.GET) public String showTweets(@RequestParam("query") String query, Model model) { TwitterTemplate twitterTemplate = new TwitterTemplate();

我正在使用SpringSocial进行twitter搜索。在我的控制器中,我有:

@RequestMapping(value="/twitter/search", method=RequestMethod.GET)
public String showTweets(@RequestParam("query") String query, Model model) {
    TwitterTemplate twitterTemplate = new TwitterTemplate();
    SearchResults searchResults = twitterTemplate.searchOperations().search(query);

    List<Tweet> tweets = searchResults.getTweets();
    model.addAttribute("query", query);
    model.addAttribute("timeline", tweets);
    return "twitter/timeline";
}
@RequestMapping(value=“/twitter/search”,method=RequestMethod.GET)
公共字符串showteets(@RequestParam(“query”)字符串查询,模型){
TwitterTemplate TwitterTemplate=新TwitterTemplate();
SearchResults SearchResults=twitterTemplate.searchOperations().search(查询);
List tweets=searchResults.getTweets();
model.addAttribute(“查询”,查询);
model.addAttribute(“时间线”,tweets);
返回“推特/时间线”;
}

但是,它返回一个空的tweet列表。我做错了什么?

看起来你没有做错什么。但这在某种程度上取决于查询是什么。我敢打赌,如果你搜索“FDSHFJAD”,你不会找到太多。但如果你搜索“VineApp”,可能会有更多的推文


出于好奇,您使用的是哪个版本的Spring社交推特?

我正在搜索奥巴马,我也在推特搜索上尝试了这些查询,它们返回推特,但是在我的应用程序中什么都没有发生!我正在使用1.0.2.RELEASE版本…我还将版本更改为1.0.1.RELEASE,并检查了依赖项冲突,但没有成功!有什么建议吗?