Wednesday, July 8, 2009

Twitter Push Notifications (to your iPhone)

Prowl is one of those "I wish I had thought of it" ideas. Sometimes after I look at the implementation of these ideas, my next reaction is "I could have done better". But not this time. Zachary West didn't miss anything that I would have thought obvious, and his implementation seems quite robust so far.

I won't waste time explaining what Prowl does (or what Push Notification is), except to observe that because Growl is quite well supported on Mac OS X, there are many possibilities for sending notifications to my iPhone when (what I decide are) interesting events occur on a Mac (or even on a Windows PC).

The first thing I thought of was to get notifications on my iPhone of Twitter mentions and direct messages. Tweetie for Mac, my preferred desktop Twitter application now supports Growl, so of course I went with it.

Installing Prowl is quite simple (and well documented). It only took me a couple minutes after buying the iPhone app to register for an account, log into Prowl on my iPhone, download the Growl plugin and set it up. Then I pressed the Preview button and got my first push notification on my iPhone.

Next I tried the growlnotify command-line tool and got my second push notification. (I will definitely exploit sending push notifications from the command-line, or from Python scripts.)

I thought the next (and final step) would be simple also: configuring Tweetie to use the Growl plugin. First I confirmed that Tweetie was set to use Growl notification for new mentions and new messages (but not new tweets). (Press the Notification Options… button in the Accounts tab of Tweetie's Preferences… window.)

Next, I configured Growl notifications from Tweetie to use Prowl. In the Applications tab of the Growl Preference Pane, I selected Tweetie and pressed the Configure… button. Then I selected "Notifications" and selected in turn "Direct Message" and "Mentions" in the Notification popup, and selected "Prowl" for the display style for both.

Then I sent a direct message to myself (@yacitus) from a test account, and I immediately received a notification on my iPhone. But tweeting a mention didn't work. I watched as Tweetie displayed the Growl notification on my MacBook Pro, but it appeared the plugin wasn't sending it along (through the Prowl servers) to my iPhone. I fiddled around for a while (with plenty more testing), and finally concluded it must be a Tweetie bug and wrote it up on getsatisfaction.com and called it a day.

Today I finally made enough time to try again. This time "for real", on the Mac mini I have connected to my TV. (Since it's on all the time, it can be running Tweetie all the time so I can receive notifications when my MacBook Pro isn't on.) I went through the same steps (after installing Growl and Tweetie) and had the same problem. But I noticed earlier (when configuring Adium to use Prowl) that I had to also set the "Application's Display Style" popup under "Application Settings" (in the Growl Preference Pane, after selecting Tweetie from the application list) to Prowl. So I tried that for Tweetie, and it still didn't work.

Then I set the "Display Style" popup for Mentions (in the "Notification" popup under the "Notifications" tab) back to "Default" and then back to "Prowl" and it worked!

So if you have trouble trying to get this working, I guess my advice is, keep fiddling with it, and try all the settings (in the Growl Preference Pane) that I mention above. Good luck.

Let me know if you think of some creative uses for Prowl.

Update: Clarified the location of the "Application's Display Style" popup.

New Blog

This will be my third blog (or fourth if you count my tumblelog—I don't, since I mainly use it for storing links for later reference). The other two are yacitus.com, which (until now) has been my catch-all, and PyPap, for Python programming posts.

I decided as I was about to sit down and write another Macintosh-related post for yacitus.com that I'm writing enough of them (the new one will be my fifth) that they deserve their own home.

So here it is.