When I read that you could use Quicksilver with Twitter, I felt as excited as Jack Bauer in an interrogation room full of terror suspects. It all started with Twitter Fan Wiki. And then I lost myself in hours of troubleshooting as I tried to force hack after hack to work the way I wanted them to. As these things are, it wasn’t nearly as hard in the end as all the work that led up to the final result.
The first AppleScript I found for the job was here. But as best as I can tell, the Keychain Access was a major bottleneck. Then I found an option that uses the Twitter Rubygem, but you’ve got to be pretty serious to install Rubygems on your Mac. I couldn’t make it happen. I’m not that serious. Then I found another way to avoid Keychain scripting, but it was still too geeky for me to get working with my limited know-how. I even found iChat support and word count with Growl notification.
I was about to give up. But I said I would give myself the length of the entire Purple Rain album to make it happen. (I hadn’t listened to it in a long time and it was my favorite album as a dirty minded pubescent teen. He said “masturbating!”) About an hour of pop/funk later, this is what I had hacked together.
Features:
- Counts characters and notifies you by Growl if you exceed 140.
- Notifies you by Growl when your tweet is sent.
- Twitter username/password is hard coded to avoid Keychain Access and reduce delays.
- Checks to see if iChat is running and then sets your status message as the current tweet.
- Checks to see if Skype is running and then sets your mood text message as the current tweet. Note: If you want to integrate Skype mood text updates, open the script in Script Editor and uncomment (remove “–”) the Skype tell.
- Growl will use the icon of Twitterific if installed.
- Need to manage multiple Twitter accounts? Just create a copy of the script in your Quicksilver Actions folder, change the username/password, and you can tweet from two accounts.
How to install:
- Download the script, unzip, and put it here:
~/Library/Application Support/Quicksilver/Actions - Using Script Editor, modify these lines of the script to your Twitter username and password:
set twitter_key_account to "your@email.com"
set twitter_key_pass to "your_password" - Restart Quicksilver.
How to use:
- Invoke Quicksilver.
- Enter text mode (hit period) and type your message.
- Tab to the Action Pane and type “Tweet” (or as much of the word as you need).
- Enter.
I hope you find this script useful. I’m no programmer, so I can’t support it. If you have addons or variations, please post them. Don’t forget to add me to your Twitter friends list. And thanks to all the coders that came before me and made this possible.
Update 4-21-07: Integrated Skype mood text updates as an option. See instructions for details.
Update 8-11-07: Integrated Facebook updates as an option. See this post: Update Twitter, Facebook, iChat, Adium, And Skype With Quicksilver
Update 5-24-09: I made a change to the curl script which should solve any previous problems.




@grahamenglish … this should do it:
tell application “Keychain Scripting”
set twitter_key to first Internet key of current keychain whose server is “twitter.com”
set twitter_login to quoted form of (account of twitter_key & “:” & password of twitter_key)
end tell
Thanks for sharing your code, Ankit. I originally used Keychain scripting but took it out because it caused delays and frankly, the Keychain can really suck sometimes. But when it works, hooray!
Using your script – thanks a lot!
From the original site, the guy made a small change which allows @replies :
use “–data-binary” instead of “-F” on the line where you sent the data to twitter over the web.
Hope this helps.
One strange thing I noticed: you say that /if/ ichat is running, it will update the status. for me, it always opens ichat even if not running, so i had to comment the lines out. other than that, excellent job!
PS – Your comment form is a little broken in Safari 3.1.1 – click on the message field and it will jump to the website field – kinda disorientating.
That is strange. It doesn’t open iChat for me, unless I’m editing the script. Whenever you’re editing a script, all apps referenced will open unless they’re commented out. But if used as a Quicksilver action, it shouldn’t open iChat. Hmmm.
Thanks for the comment form heads up. Haven’t seen that happen myself.
Hey Graham… for some reason the script isn’t updating my status. I’ve triple checked my login info in the script and I get the growl notice just fine… but no update. Any clue what else could be going wrong?
It isn’t updating your Twitter status? Or one of the other apps? Also, are you using your email as login or your username? I use my email. Another thing that could be wrong is if your password has special characters like & # @ etc.
Thanks for the script, works great!
Thanks for this script! Works flawlessly!
This script is really amazing. Really helps me out everyday. Thanks so much. You rock
thanks for this!
FYI, change the line that sets ‘twitter_status’ to:
set twitter_status to quoted form of (“source=qucs&status=” & tweet)
and you’ll also see “from Quıcĸsıɩⅴεʀ” show up in your tweets.
Peter, you hooked it up big time! Thanks!
I should give credit where credit is due. I originally found this tidbit from Mike Keen here: http://blog.codahale.com/2007/01/15/tweet-twitter-quicksilver/
Cheers!
great job, thanks !
I tried Rob Record’s workaround by switching out the “-F” for “–data-binary” but the @ problem persists. However, now it growls a success at me, even though the tweet wasn’t actually sent. Otherwise, nice work. I use it constantly.
Must be the idiosyncrasies of your system. I wonder if Quicksilver could have anything to do with it?
can´t work for me
i do it all, and grow shows me the message but not updates at twitter .
How can i do??
user and pass are ok .
Thanks
Try using your email address instead of your username.
i do it :/
You know, it just stopped working for me and I had to change my login from my email to my username. I think Twitter’s been tweaking the API.
So tasty, but either way i set up username or email, i see the growl notification but no actual Tweet. A shame, as it is obviously worked on and an elegent solution. I will keep an eye out… thanks for sharing.
Strange that it’s not working for some people. I wonder if it has anything to do with Quicksilver versions. If you shoot me an email with your script, maybe I could test it on my machine.
This script is extremely exciting. Unfortunately I’m having the same issue as laurindel: Growl notifies me that the tweet has been sent, but my Twitter feed is not updated.
I’m using OS X 10.5.6 and Quicksilver 3815.
I will be thrilled if anyone is able to get to the bottom of this problem.
Twitter has tightened up what http headers it will accept, so you need to modify the headers that curl sends. Bottom line, replace the twitter curl line in the script with the following:
set results to do shell script "curl --user " & twitter_login & " -H \"Expect:\" -F " & twitter_status & " http://twitter.com/statuses/update.json"I’m really, really excited about this script, but I’m having the same problems other people have been having. Growl pops up correctly, and my iChat status is updated, but nothing budges on Twitter itself. I tried editing the curl line in the script like the last comment suggests, but I’m still having the same problem. Any chance this can be fixed? The idea is tremendously awesome.
Quicksilver version 3815
Mac OS X 10.4.11
Just made some changes that should solve any problems. Download it again and have fun!
Fantastic work, Graham! Everything’s working beautifully now. Thanks so much for the update.
hi, i cant get the facebook part to work, in the script, i dont even see anything that ask for the facebook credentials, how is this working?
There is no Facebook integration in this version. See this post and read my last comment.
Thanks. I’ve been messing w/ this all day. Your instructions were the best I’ve run across.
hpm
You’re welcome.
Yes, works great! If you use other application then Twitterific. For example TweetDeck. In Script Editor you can change Twitterific.app into Tweetdeck.app.
Thank you Graham!
doesn’t use OAuth huh? i guess this is broken now :-/
Probably. I stopped using the script myself awhile back when I bought a new iMac and decided not to install Quicksilver. So I doubt I’ll be updating it. I’m sure someone else out there will have a working Twitter/Quicksilver script soon, if they don’t already.
A Mac without Quicksilver? That’s a strange notion indeed!
That’s what I thought at first. Quicksilver was always my first install on a new Mac. But I kept having lots of problems with it and just using it as an application launcher didn’t seem worth the CPU or RAM, especially when Spotlight does the trick just as fast. So there’s a few functions I miss but overall, I don’t miss it. Sorry to say.
Noob question: When you say “Download the script, unzip, and put it here: ~/Library/Application Support/Quicksilver/Actions”
How do I “put it?”
I’ve downloaded it, unzipped it, and I’m trying to figure out how to accomplish the next step…
Hi Matt,
“put” = copy and paste, or drag and drop it into the correct folder
I know this is old, but I can’t find any folder related to Quicksilver named actions. Any ideas?
If the folder doesn’t exit, you need to create it. Here’s the path:
~/Library/Application Support/Quicksilver/Actions