Questions tagged [twitter-hbc]

Hosebird Client (hbc) is a Java library for consuming Twitter's streaming API.

The client can be used on it's own or in conjunction with Twitter4J. It was announced in 2013 and the project is hosted on GitHub.

27 questions
4
votes
2 answers

IOExcpetion while connecting to Twitter Streaming API with Apache Flink

I wrote a small Scala program which uses the Apache Flink Streaming API to read Twitter tweets. object TwitterWordCount { private val properties = "/home/twitter-login.properties" def main(args: Array[String]) { val env =…
peterschrott
  • 570
  • 5
  • 25
3
votes
3 answers

When adding dependency: CDI deployment failure, Unsatisfied dependencies for type Set with qualifiers @Default

When I add the twitter hbc dependency to my pom.xml I'm getting an error. I followed the instructions from here. I don't get it, if it was a dependency problem I should have found a fix on the web but if I comment out that dependency, my server is…
Ced
  • 15,847
  • 14
  • 87
  • 146
3
votes
1 answer

Update keyword list for streaming API on-the-fly using HBC

I'm working on a project accessing Twitter's Streaming API with HBC. I'm storing keywords for Twitters Streaming API (filter) in a file and now I'm looking for a way to close and reconnect to Twitter each time the file changes. I googled with no…
theShadow89
  • 1,307
  • 20
  • 44
3
votes
1 answer

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 enabling authentication on proxy, I have also set…
protocolon
  • 103
  • 1
  • 9
2
votes
1 answer

Twitter4j vs Twitter hbc

I have used Twitter4j in past to read twitter public stream but have not used twitter hbc (which is twitter's official java library for streaming apis). My use-case is to : Listen to a twitter stream based on certain filter query. My question…
Prakash P
  • 3,582
  • 4
  • 38
  • 66
2
votes
1 answer

Twitter HBC API : Flag to check the status of the Streaming API Connection

How can I check if the twitter streaming API is connected or disconnected ? Is there any variable that stores this information ? On Failure, Twitter Hosebird Client (hbc) internally tries to reconnect to the API. This information is logged. How can…
2
votes
3 answers

Fatal error code 406 using hbc when filtering by location

I'm trying to use the Twitter hbc library to get tweets based on locations. I've set up my code according to the example file FilterStreamExample. The example works, but when I try to add a location to the endpoint, I get Fatal error code:…
user1801348
  • 55
  • 1
  • 5
2
votes
1 answer

Java application not authenticating against Twitter when run on different server

I am trying to run a Java .jar file on my remote Linux Amazon AMI server. Locally, when I run this Java project a permanent HTTP connection is established and everything works as expected. If I run this on my server though, I get an authentication…
the_critic
  • 12,720
  • 19
  • 67
  • 115
1
vote
0 answers

Twitter HBC: sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

I am trying to get Twitter HBC to work. I have not much experience with Java, so I tried their examples. But I always get this error message: sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) and some other error messages. I found the…
1
vote
0 answers

How to filter out messages from hbc twitter?

I have tried Sample Streaming API and would like to get tweets that are only created and would like to ignore the tweets that are deleted. I have tried the filter level to be Medium to get more created messages but the result include a lot of…
Chit Khine
  • 830
  • 1
  • 13
  • 34
1
vote
1 answer

Save raw json strings with hbc Twitter4jStatusClient

I am trying to store the tweets from Sample Stream into a database and store the raw json at the same time. I am using Twitter4jStatusClient following the example in hbc Github repository. Since I am only storing a subset of information into the…
Aithusa
  • 169
  • 1
  • 14
1
vote
1 answer

Twitter hbc API: how to get the individual tweet texts?

I am going to use Twitter for some semantic text analysis in a school class. I downloaded the Hosebird Client for Java and is running the FilterStreamExample.java:…
Wikzo
  • 170
  • 2
  • 12
1
vote
0 answers

Handle reconnection for twitter hbc

I'm having trouble figuring how to deal with disconnections with hbc twitter api. The doc says I need slow down reconnect attempts according to the type of error experienced. Where do I get the type of error experienced? Is it in the msgQueue or the…
Ced
  • 15,847
  • 14
  • 87
  • 146
1
vote
0 answers

Twitter4j BlockingQueue.queue gives nullpointer exception when used with axis 2 jars

I am trying to use the twitter4j API for consuming the streaming API for twitter. It is working perfecting fine until i have added few axis 2 libraries. Code: BlockingQueue queue = twitter.getBlockingQueue(); //Infinite loop to…
1
vote
1 answer

Use Hbc Twitter Stream without specifying any track terms

I followed the Quickstart from HBC and I managed to get some tweets from the Twitter Stream specifying some track terms, here is the code: /** Declare the host you want to connect to, the endpoint, and authentication (basic auth or oauth) */ Hosts…
madx
  • 6,723
  • 4
  • 55
  • 59
1
2