0

I might well be the only person in the world trying to do this but I wrote a neat little program in Processing using the Twitter4j library which accesses the Twitter stream and displays Tweets based on given keywords, and now I want to implement into a website I'm about to write (in Adobe Brackets).

Using p5.js I'm able to access the basic functionality of Processing (in Javascript), but I have absolutely no idea how to use/access the Twitter4j library (since it's in Java).

Any ideas or alternatives?

Georgi
  • 29
  • 4

1 Answers1

1

You can't use a Java library from a JavaScript application. You'll have to find a JavaScript library and use that instead. If you want to stick with the Java library, then you'll only be able to deploy as a runnable jar or as an executable. You won't be able to embed it in a website.

Technically, you could deploy as a Java applet, but that's going to be more of a pain in the neck (for both you and your users) than just redoing it in JavaScript.

Here is an answer that describes using Twitter's JavaScript library. Here is Twitter's documentation on using their API.

Community
  • 1
  • 1
Kevin Workman
  • 41,537
  • 9
  • 68
  • 107