Copy the API key, the API secret, the access token, and the access token
secret. You’ll need them in the next section, when we Tweet messages using
Processing.
Tweeting Messages with Processing
Processing doesn’t have Twitter support, but in Processing programs we have
direct access to Java libraries, and you can find several good Twitter libraries
for Java. One of them is Twitter4J.
5
We’ll use it because it’s very mature and
has excellent OAuth support.
Download Twitter4J from its website
6
and unpack it to a temporary folder.
Depending on the version you’ve downloaded, you’ll find a file named
twitter4j-
core-x.y.z.jar
or
twitter4j-core-x.y.z-SNAPSHOT.jar
in the folder. Open the Processing
IDE, create a new sketch, and then drag and drop the
jar
file to the IDE. (The
5.
http://twitter4j.org/
6.
http://twitter4j.org/en/index.html#download
Chapter 10. Networking with Arduino • 168
report erratum • discuss
www.it-ebooks.info