Time to Start Tweeting With TweetMe4i, Part 1
Twitter (www.twitter.com ) has been around a while now. Ever since its inception, I’ve been incrementally trying to use it to learn what the craze is about. In the early days, my Twitter account (twitter.com/aaronbartell ) sat mostly idle because I just didn't “get it.” That was then and this is now. Now I can see that there are limited features in Twitter, but those limited features can be used for many scenarios. The basic concept of Twitter, in my words, is a way to relay a short message to both the world and everyone who’s following you. The world knows about your tweet because everything you post is public and searchable (unless you specify otherwise), and your followers know about your tweet because they chose to subscribe to your profile and be notified whenever you submit a new post.
If you’re still scratching your head as to why somebody might use Twitter, never fear! Many very creative people out there have taken this simple technology concept and built on it. Check out these 25 ways to creatively use Twitter .
Maybe some of those ideas are a little over the top, but I do have one thought on how Twitter could help us geeks in our daily jobs. If you look at Twitter from 10,000 feet, it’s basically a proxy notification mechanism. Given that fact, it’d seem to be a perfect fit for automatically notifying you of things happening on your IBM i server. Say a job goes into MSGW status. You could send a tweet to a Twitter account that your IT staff members are subscribed to and each person would be notified of the MSGW status on a smartphone or desktop application (TweetDeck is one I use).
Introducing TweetMe4i
Now that we have a legitimate business need, we need to figure out how to communicate from our IBM i to the proxy Twitter account. This situation calls for some open-source and freely available Java tooling named Twitter4J that can be found at twitter4j.org. I selected this library from the many Java ones available because it seems to have extensively covered all of the available Twitter APIs. For the purposes of this article, we’ll be focusing on probably the most commonly used Twitter API, “sendUpdate.” The Twitter4J APIs are well written, but they are written in Java and I want to give RPG programmers and system administrators the capability to easily send updates to Twitter without having to learn the Java language. To that end, I’ve created a new open-source project named TweetMe4i that has both command line components and RPG programs to send tweets to your Twitter account.
Before we go any further, it’d be good for you to install TweetMe4i, available on my website . You’ll find version 1.00 of TweetMe4i in the right navigation area under Resources. Download the .zip file and follow the install instructions in the readme.txt file. One thing I wanted to note about the install that’s different than my traditional approach to deploying Java on IBM i is that I’m now putting all IFS-related files into their own *SAVF object using the SAV and RST commands. This makes packaging and installation much simpler because it can happen in fewer steps and is less prone to accidentally forgetting files (more on this topic in a future article).
Please enable JavaScript to view the comments powered by Disqus.
comments powered by