Giter VIP home page Giter VIP logo

Comments (8)

xsl avatar xsl commented on July 24, 2024

try doing a "mvn compile" (or mvn install) first, and then make that exec call

from hbc.

scumola avatar scumola commented on July 24, 2024

Ahh, that worked great! Is there a way to compile it all to a .jar file so I can move it around from machine to machine?

from hbc.

scumola avatar scumola commented on July 24, 2024

Does BasicAuth work? I commented-out the OAuth line in hbc-example/src/main/java/com/twitter/hbc/example/SampleStreamExample.java and uncommented the BasicAuth line and I'm getting:

Did not receive a message in 5 seconds
Did not receive a message in 5 seconds
[hosebird-client-io-thread-0] INFO com.twitter.hbc.httpclient.ClientBase - sampleExampleClient Done processing, preparing to close connection
[hosebird-client-io-thread-0] INFO com.twitter.hbc.httpclient.ClientBase - sampleExampleClient Establishing a connection
[hosebird-client-io-thread-0] WARN com.twitter.hbc.httpclient.ClientBase - sampleExampleClient Error connecting w/ status code - 401, reason - Unauthorized
Did not receive a message in 5 seconds
Did not receive a message in 5 seconds
Killed

from hbc.

kevinoliver avatar kevinoliver commented on July 24, 2024

Most likely you need to recompile after that change. I'll update the docs to make this more obvious.

Try running:
mvn compile && mvn exec:java -pl hbc-example

from hbc.

scumola avatar scumola commented on July 24, 2024

I had to recompile after making the changes, I guess. I am using the BasicAuth ("username","password); now and I'm getting:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project hbc-example: Compilation failure: Compilation failure:
[ERROR] /root/hbc/hbc-example/src/main/java/com/twitter/hbc/example/SampleStreamExample.java:[40,30] error: cannot find symbol
[ERROR] symbol: class BasicAuth
[ERROR] location: class SampleStreamExample
[ERROR] /root/hbc/hbc-example/src/main/java/com/twitter/hbc/example/SampleStreamExample.java:[55,11] error: incompatible types

from hbc.

scumola avatar scumola commented on July 24, 2024

Added: import com.twitter.hbc.httpclient.auth.BasicAuth;
Now it compiles! Yea! Thanks!

from hbc.

kevinoliver avatar kevinoliver commented on July 24, 2024

and did you successfully connect to the api?

from hbc.

scumola avatar scumola commented on July 24, 2024

Yea, it's working. I'm getting the stream output now. I'm trying to turn off all of the extra output though or send that to stderr instead of stdout so I can pipe stdout to my app. Also, hitting ctrl-c doesn't really stop and disconnect hbc, but those are different errors than this one. I will close this issue. Thanks for the help!

from hbc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.