Two Java libraries to connect to the Twitter streaming API are twitter4j and tweetstream4j.
The Twitter streaming API allows "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.).
However, trying to use tracks with spaces in twitter4j causes an error (401 unauthorized). tweetstream4j also throws a 401 when using tracks with spaces.
Has anyone used a Java library to connect to the Twitter streaming API and used tracks with spaces? Which library and version?
Yusuke claims to have fixed this for twitter4j 2.1.7.