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.
Mark says
Works like a charm!
Thanks for making this – I could never have done it myself, and will be twittering a lot more from now on…
Don’t know if that’s for the better or worse π
Gabriel says
I have no “Action” folder at ~/Library/Application Support/Quicksilver/
Do I have to create it?
Graham English says
Awesome! Glad it worked like I said it would. π
For better or worse, I may Twitter more, but it takes me less time to do it. Plus, I’m saving system resources by not needing a browser to be open or running a separate app like Twitterific (Which is still a pretty cool app). It’s win-win. π
Milkfilk says
This is fantastic Graham. AppleScript is a dark art and I appaud you for whipping it up (even in a purple rainstorm).
This is going into my “One True Way” routine.
Derek says
Got it to work! But, it’s not working like it should. When I open quicksilver, I have to type tweet, and then tab, then tab, and then enter my tweet. Oh well, I’ll take it!
Graham English says
@Milkfilk: Glad you like it. I didn’t code it from scratch. Just hacked a bunch of different AppleScripts together. But I really love AppleScript. The more I get into it, the more I realize how powerful it is. But playing with the dark arts does have its price! π
@Derek: That’s strange. You know I have a similar problem with the Address Book plugin. Everything’s backwards. I can’t put a contact as an object in the third pane but I can do it in the first object pane. I’m going to look harder for a fix and if I find anything, I’ll let you know.
Graham English says
@Gabriel: Yes. Just create an ‘Action’ folder and you should be set.
Justin says
I can’t get it to work. It will update my ichat status, but it will not update my twitter status
Graham English says
Justin, my guess is that you didn’t do the username/password edit correctly.
You want to change this:
Leave the quotes there. Double check if your username is your email or profile handle. But both should work. If you aren’t getting a growl notification that your tweet has been sent, then it’s not getting through to the server. Let me know what happens.
Jim of Davao says
Works great! Thanks!
Though I am not seeing the character count.
Graham English says
@Jim of Davao: Do you have Growl installed? If so, you might need to turn it on in Quicksilver. Go to Quicksilver’s preferences and search for it in the plugins menu. Let me know how it goes.
Steven Tryon says
Very nice, Graham! Thank you!
Steven
Graham English says
You’re welcome, Steven. π
Christopher Miles says
This is fantastic! BTW anyone using Adium rather than iChat can just substitute the reference to iChat in the Applescript with Adium.
Graham English says
Thanks for pointing that out Christopher. Before the end of the day, I’m going to have a Skype update too.
Graham English says
Figured it out. Add this below the iChat tell:
I’ll consider adding it to the script or providing an alternate version if people are interested.
raymon says
fantastic script & works like a charm – know this is extremely presumptious but … could you create a script that works with jaiku … or even something like twaiku (which I can’t get to work) … thanks for your work …
Graham English says
Raymon, how much $ are you offering? π
I haven’t looked at jaiku yet. I’m thinking about joining, but it won’t be this week. Maybe if I do, I’ll see if I can hack something together. I’ll give you a shout if I do.
raymon says
no $ just the rewards found in a challenge π btw did get twaiku to work …
Graham English says
π I’ll check out twaiku. But can’t you just put your twitter feed into jaiku? Is there a benefit to cross posting?
Mark Boszko says
This is excellent – will definitely be using this from now on. Quicksilver is the bee’s knees already, but you just made it a bit bee’s kneesier.
Graham English says
Ha ha. Glad you dig it, Mark.
raymon says
>Is there a benefit to cross posting?
>”The reason we can do that is because I have flexibility. I donΓ’β¬β’t want to have to say, Γ’β¬ΕI canΓ’β¬β’t do that”
You answered the question yourself.
Enjoying your twitters & see them alomost instantanouesly with Twitterrific (i think)
Graham English says
You’re absolutely right, Raymon. Or should I say, I was absolutely right? π
I guess what I meant to say was, is there a benefit to cross posting as opposed to just putting your Twitter feed into Jaiku. Know what I’m saying?
Justin says
Graham,
I’ve tried it both ways, with my user name and with my email address (both in the quotes as you mentioned), and neither works. It changes my ichat status and I get a growl notification saying that its been sent, but it doesn’t make it through to my twitter account.
Not sure why?
Hubert says
Cool thing, works perfectly, thanks!
Graham English says
You’re welcome, Hubert.
By the way, Justin and I fixed his problem. Avoid putting a ‘?’ in your password. It breaks the Twitter URL into a query string.
keizo says
Thanks, I got your script.
And it works except “@” is in top of twitter not works.
Do you have any idea?
Graham English says
That’s about the only downside with this script. You can’t use the @ symbol. I’m sure there’s a way to get it to work, but I haven’t tried. If I find a fix, I’ll post back.
Since I always have iChat open, and that’s where I get my Twitter updates from, I use that to send direct messages and @ messages.
keizo says
Hi, Graham.
I changed –data-binary from -F, I could comment to Twitter with “@”.
Is that not good?
Graham English says
@keizo: That worked for me too. Nice job! Thanks.
jeremybeasley says
Hi,
Could you please tell me how you enabled commenting w/ the “@” symbol? I tried following the last two posts but the seem somewhat cryptic: “changed βdata-binary from -F”….I don’t know what this means.
Graham English says
I’ve already made the changes to the script so all you need to do is download it.
Graham Gilbert says
Hmm, my wordpress told me you’d linked to my Quicksilver / Twitter / Various IM Clients script. I guess not then?
By the way, if you’re needing more features (but to be honest, I don’t use half of them myself!) check out my script. It will update the status of not just Skype and Adium, but MSN Messenger, iChat and Proteus as well as shortening any URLs that take you over the 140 limit using TinyURL.
Ok, I’ll stop pimping myself now π
Graham English says
I just trackbacked because it was a common theme and we have a common name. π
Pimp away!
Noah says
Just installed the script, and I love it. I would never use sites like Twitter without Quicksilver. Thanks again for hacking these scripts together.
Graham English says
You’re most welcome, Noah. And I wouldn’t use Twitter nearly as much as I do if I had to use a browser or some other resource using app.
Chris Ereneta says
Killer. Thanks for this.
Graham English says
You’re welcome, Chris. Happy Twittering. π
Gaurav Patel says
I love you.
I was looking for this exact thing. I used Twitterrific before and that was a huge distraction. I was constantly being distracted by people updating theirs and I didn’t want to close it because it meant I couldn’t update mine whenever I wanted.
I only jumped on the Twitter bandwagon yesterday and I’m already addicted.
Graham English says
Thanks for the comment, Guarev. π
Jeremy Helms says
Well, it works, as long as you don’t use an @ as the first character of the tweet (as in @username). Doing so results in no growl report whatsoever, but I do have Console logs of the failure.
I can send you a more detailed report if you’re interested, but mainly what I’m seeing is “curl: (26) failed creating formpost data” along with a bunch of transfer times and rates.
Maybe this is a Quicksilver issue and not with your script, but I figured it was worth posting here in case someone else is having this problem…
Graham English says
Hmmm. It’s working for me. I made a change at some point to allow the @ so I’m not sure why it wouldn’t be working unless Twitter recently made some changes. If I find out anything, I’ll let you know.
Jeremy Beasley says
I think that I’ve figured out the recent issue with Twitter and using messages that begin with “@”. The script works but it sends the message to your “Archive” tab on twitter and not the “Recent” tab. Also, it seems that Twitter is interpreting the message as a reply to another user, e.g. “@ home: watching tv” is interpreted as a Twitter reply to user “home”.
I’ve been working nonstop for the past week trying to find a way to workaround this issue. However, this seems like something that can’t be solved with better AppleScript. This may be an issue with Twitter.
Let me know if you all find a way around this.
Graham English says
The fact that tweets are showing up in your archive but not recent is definitely a Twitter issue and not with the script. Same with putting @ in front of any word. Twitter interprets that as a reply to a user. I’ve had issues with Twitter not updating my recent page properly at times. Growing pains.
rob says
Awesome script! Thanks, man.
Ed Lamblet says
Working great here in Leopard 10.5.2 and QS 3815 ! Thanks
Graham English says
You’re welcome, Rob.
Glad to hear it’s working for you, Ed. Cheers.
Ankit.G says
Hey Graham, I just found your quicksilver / twitter hack while looking for a fix for my keychain, multi key update script … I am able to access the keychain and get hold of the keys I want to update, but the it changes the new password to only the first character of whatever I try to set. Anyways, I think I could help add keychain based password management to this
Ankit.G says
Hey Graham, I just found your quicksilver / twitter hack while looking for a fix for my keychain, multi key update script … I am able to access the keychain and get hold of the keys I want to update, but the it changes the new password to only the first character of whatever I try to set. Anyways, I think I could help add keychain based password management to this (if it doesn’t also misbehave like trying to change the password). Although I haven’t tried your script yet and have exams this week, but I am following you on twitter, so tweet away and we’ll catch up after exams … =)
Ankit.G says
@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
Graham English says
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! π
Rob Record says
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.
Graham English says
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.
Henrik says
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?
Graham English says
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.
Stephen P says
Thanks for the script, works great!
Joseph McLaughlin says
Thanks for this script! Works flawlessly!
Andre B says
This script is really amazing. Really helps me out everyday. Thanks so much. You rock π π
mc says
thanks for this!
Peter van Broekhoven says
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.
Graham English says
Peter, you hooked it up big time! Thanks!
Peter van Broekhoven says
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!
matiasjajaja says
great job, thanks !
Scott McLemore says
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.
Graham English says
Must be the idiosyncrasies of your system. I wonder if Quicksilver could have anything to do with it?
laurindel says
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
Graham English says
Try using your email address instead of your username.
laurindel says
i do it :/
Graham English says
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.
Ian Wright says
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.
Graham English says
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.
David Chambers says
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.
Robert Egginton says
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"
Kristen says
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
Graham English says
Just made some changes that should solve any problems. Download it again and have fun!
David Chambers says
Fantastic work, Graham! Everything’s working beautifully now. Thanks so much for the update.
peng says
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?
Graham English says
There is no Facebook integration in this version. See this post and read my last comment.
hanspetermeyer says
Thanks. I’ve been messing w/ this all day. Your instructions were the best I’ve run across.
hpm
Graham English says
You’re welcome.
wverwer says
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!
Ankur says
doesn’t use OAuth huh? i guess this is broken now :-/
Graham English says
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.
David Chambers says
A Mac without Quicksilver? That’s a strange notion indeed!
Graham English says
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.
Matt says
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…
hans says
Hi Matt,
“put” = copy and paste, or drag and drop it into the correct folder
Alex Dolan says
I know this is old, but I can’t find any folder related to Quicksilver named actions. Any ideas?
Graham English says
If the folder doesn’t exit, you need to create it. Here’s the path:
~/Library/Application Support/Quicksilver/Actions