简体   繁体   English

Java中的Twitter流API带有空格的轨道?

[英]Twitter streaming API in Java with tracks that have spaces?

Two Java libraries to connect to the Twitter streaming API are twitter4j and tweetstream4j . 连接到Twitter流API的两个Java库是twitter4jtweetstream4j

The Twitter streaming API allows "tracks" with spaces : Twitter流API允许带有空格的“曲目”

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. 如果所有单词都出现在推文中,则短语匹配。 (eg 'the twitter' is the AND twitter, and 'the,twitter' is the OR twitter.). (例如'twitter'是AND twitter,而'the,twitter'是OR twitter。)。

However, trying to use tracks with spaces in twitter4j causes an error (401 unauthorized). 但是,尝试在twitter4j中使用带空格的轨道会导致错误 (未经授权的401)。 tweetstream4j also throws a 401 when using tracks with spaces. 当使用带空格的音轨时,tweetstream4j也会抛出401。

Has anyone used a Java library to connect to the Twitter streaming API and used tracks with spaces? 是否有人使用Java库连接到Twitter流API并使用带空格的轨道? Which library and version? 哪个库和版本?

Yusuke 声称已为twitter4j 2.1.7 修复了此问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM