0

I'm using the hbc tools to build an app using streaming Api. I just want to get the public streaming flow without any trackword or others filters. How can I manage to do that? Here is a sample of code I wrote:

StatusesFilterEndpoint endpoint = new StatusesFilterEndpoint();
endpoint.trackTerms(Lists.newArrayList("#aTweet"));
Authentication auth = new OAuth1(consumerKey, consumerSecret, token, secret);
Client client = new ClientBuilder()
            .hosts(Constants.STREAM_HOST)
            .endpoint(endpoint)
            .authentication(auth)
            .processor(new StringDelimitedProcessor(queue))
            .build();
// Establish a connection
client.connect();

With this, I can just track a tweet but not all the public flow of tweet. Thanks for your answers ^^

Luhd
  • 1
  • 1

1 Answers1

0

StatusesFilterEndpoint uses filter endpoint and it returns just matched tweets. There is also StatusesSampleEndpoint implementation in hbc-core which returns small random sample from all tweets.

omerfarukdemir
  • 158
  • 1
  • 10