Stream API get parsing error by hbc


When I use hbc to parse tweets from stream api, I get the following err:

Caused by: twitter4j.JSONException: JSONObject[“text”] not found.

The reason is that I kept getting the following useless tweets



How I can filter out those useless tweets. I only want real time and read-only tweets for data analysis purpose. Here is my Java code:

BasicClient client = new ClientBuilder()
            .processor(new StringDelimitedProcessor(queue))


The messages that are causing your parser to throw an error are actually limit notices. As described they are being delivered because your track terms are matching more tweets than are permitted by the streaming APIs rate limit.

It also looks like you are using Twitter4j on top of hbc. In that case make sure that you have taken a look at and understand the The only difference for you will be the endpoint being filter and not sample.

Hope that helps! Let me know if you have any other questions.