0
我不断收到搜索查询太多字符的Twitter 403错误。Twitter API搜索 - 如何检查查询字符长度?
search = Twitter::Search.new.contains("#{self.home_team.long_name} #{self.away_team.long_name} win OR lose")
search.language("en").no_retweets.since_date(since)
如何计算查询有多少个字符,所以我跳过试图对其执行搜索?例如,这一个是156个字符:
GET https://search.twitter.com/search.json?q=Middle%20Tennessee%20State%20Blue%20Raiders%20Florida%20International%20Golden%20Panthers%20win%20OR%20lose%20-rt%20-from%3Aespn&&lang=en&since=2011-02-09: 403: Sorry, your query is too complex. Please reduce complexity and try again.