连接到 Twitter 流 API 的两个 Java 库是 twitter4j和 tweetstream4j .
Twitter 流 API 允许 "tracks" with spaces :
Comma separated keywords and phrases are logical ORs, phrases are logical ANDs. Words within phrases are delimited by spaces. A tweet matches if any phrase matches. A phrase matches if all of the words are present in the tweet. (e.g. ‘the twitter’ is the AND twitter, and ‘the,twitter’ is the OR twitter.).
但是,尝试在 twitter4j 中使用带空格的轨道会导致 an error (401 未经授权)。当使用带空格的轨道时,tweetstream4j 也会抛出 401。
是否有人使用 Java 库连接到 Twitter 流 API 并使用带空格的轨道?哪个库和版本?
最佳答案
佑介claims to have fixed this适用于 twitter4j 2.1.7。
关于java - Java 中的 Twitter 流媒体 API 中的轨道带有空格?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4129552/