Streaming tweets with Hosebird
NickName:user Ask DateTime:2015-06-11T06:24:43

Streaming tweets with Hosebird

I'm trying to get a stream of public tweets using Hosebird (https://github.com/twitter/hbc), which I'm completely new to. I tried using their 'Quickstart' example, just to get an idea of what the streaming is like, so I copied the example code. The only changes I made were getting rid of the 'followings' variable, and filling in the proper OAuth information.

After connecting using hosebirdClient.connect(), I added this code in an attempt to print one tweet:

String msg = null;
   try {
      msg = msgQueue.take();
   } catch (InterruptedException e) {
      e.printStackTrace();
   }
System.out.println(msg);

The code is free of errors, but then stays on the line String msg = msgQueue.take() forever, instead of producing a tweet. Any ideas on what I'm doing wrong?

Copyright Notice:Content Author:「user」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/30768350/streaming-tweets-with-hosebird

More about “Streaming tweets with Hosebird” related questions

Streaming tweets with Hosebird

I'm trying to get a stream of public tweets using Hosebird (https://github.com/twitter/hbc), which I'm completely new to. I tried using their 'Quickstart' example, just to get an idea of what the

Show Detail

twitter hosebird client not working

I am trying to get tweets via hbc-twitter4j-v3 . Example code is : https://github.com/twitter/hbc/blob/master/hbc-example/src/main/java/com/twitter/hbc/example/Twitter4jSampleStreamExample.java For

Show Detail

Reading Tweets in Java with Twitter-hbc - IOException

I need to read tweets according to certain hashtag filters, so I tried out Twitter's streaming api with the java hbc client. As a start, I tried to run the sample code provided with the project in ...

Show Detail

Get big number of random tweets

I have to collect a big set (3000-5000) tweets selected randomly for a manual annotation, but I have some restrictions: all the tweets must have an image attached to; duplicated tweets are not al...

Show Detail

Streaming Tweets Via Python

I am using twiiter streaming api and twython module with python 2.7 windows 7 os. I want to click a button and streaming of tweets should start. and on clicking the streaming should stop.I am using

Show Detail

Twitter streaming API not return full tweets

I used tweepy to write the code to streaming tweets, but it seems the tweets were truncated and the long tweets I got are not full, they are end with ... Is there any way that I could streaming th...

Show Detail

Spark streaming - filter tweets after streaming with geolocation

I am a beginner trying to get tweets using spark streaming using Scala with some filter keywords. Is there a possibility to filter only the tweets which don't have geolocation as Null after streami...

Show Detail

Crawl streaming tweets and historical tweets with python

I want to crawl streaming twitter data with python for a search query. One questions here: is it true that data I will collect is generated right from the time I run the script? Also, how to crawl

Show Detail

Twitter Streaming Filter API: Not seeing tweets

I'm dabbling with the twitter streaming filter API (https://dev.twitter.com/streaming/reference/post/statuses/filter). I have two twitter accounts. One account I'm using for the API calls, the othe...

Show Detail

Tweets from Twitter Streaming API

Using Twitter Streaming API getting tweets from a specific query. However some tweets came with different codification (there are boxes instead of words). Is there any way to fix it?

Show Detail