Blog Pile

Leave it to a Dog to Fix the Keynote Autotweeter


cc licensed ( BY NC SA ) flickr photo shared by Travis Estell

UPDATE (Sep 21, 2013): If you are new to setting this up, see the new instructions.

Poor Dean Shareski, he cannot send tweets out from his Keynote presentations a la the methods previously written up here.

He might be, as he often says “pooched”.

Have no worries, Dean I got your fix. Leave it to the CogDog.

When Dean first tweeted that, I checked the command line tool twurl that is what sends out the tweets. Actually, I had to reinstall it because of some shenanigans I had done to my system with Ruby updates. And when I looked at the twurl docs, it was already using the twitter API 1.1 (at least the most current version). I sent a few tweets from the terminal using :

twurl -d 'status=Yo @shareski Tweeting from twurl' /1.1/statuses/update.json

And ti worked fine. So to me it seemed like everything was okay. Except when I ran the KeynoteTweet app, it never sent the tweets. That told me it was something amiss with the app not communicating to twurl (it is just an AppleScript app that listens to evens from Keynote and passes them to twurl).

When Chris Long piped up tonight

I decided to look a bit closer.

If you want to learn how the thing works (I am looking at you, Dean, Mr “I don’t do tech, I crowd source”), first launch the AppleScript Editor (in the OS X Utilities folder). The from the file meni, use Open to open the Keynote 2 app script.

And it was there I saw the problem, the line that sends the tweet to twurl was out of date

do shell script "twurl -d " & twitter_status & " /1/statuses/update.xml"

as that us the API 1.0 method which Twitter stuck a fork in.

It was a matter of editing that script to read

do shell script "twurl -d " & twitter_status & " /1.1/statuses/update.json"

And saving the script. This message was sent from Keynote

I uploaded this newer version of the Keynote Tweet app (you might have to install the newer version of twurl)

http://cogdogblog.com/code/keynote-tweet-2.5.zip

Only lightly tested, let me know if it works.

Now I have some squirrels to chase. Cya.

UPDATE (Sep 21, 2013): If you are new to setting this up, see the new instructions.

If this kind of stuff has value, please support me by tossing a one time PayPal kibble or monthly on Patreon
Become a patron at Patreon!
Profile Picture for CogDog The Blog
An early 90s builder of web stuff and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person. And he is 100% into the Fediverse (or tells himself so) Tooting as @cogdog@cosocial.ca

Comments

  1. Hey Dog,

    Great work on the KeynoteTweet, which I’ve been trying to get working for the past two days! Discovered that there was probably something wrong with the APA change-over and was hunting for a fix and found this page. I updated everything as you suggested, but KNT still doesn’t seem to be working. I can tweet directly from the terminal through Twurl, so that’s something, but Keynote doesn’t seem to be communicating with terminal/twurl (the error code I get on KeynoteTweet notification is ‘sh: twurl command not found’).

    I think everything is up-to-date (twurl 0.8.3), ruby 1.8.7, and I’m on mac osx 10.5.8.

    It’s been a nightmare getting even this far, but I’m so close that I don’t want to give up!

    Hoping you can help.

    Rob

      1. Thanks for taking the time to help Alan. I checked the the PATH environment, and for twurl, it says it’s in /usr/local/bin/twurl. I added the application folder to the PATH environment to see if it changed anything, but I’m still getting the same error code…

        So close but yet so far…. 🙁

        1. Okay, another thing to try, and getting even deeper into unix things I do no understand. You might have to change your default shell; see this tech article which hints at what the command in apple script expects

          https://developer.apple.com/library/mac/technotes/tn2065/_index.html

          My shell in Terminal reports as bin/bash — I suspect yours might be bin/sh

          The other thing you can try is to open the Keynote tweet app in Apple Script Editor– look for the line like:

          do shell script twurl -d ….

          it might work if you enter your full path to twurl

  2. Running the app springs an error:
    OSStatus error -67049
    I tried running the script by itself… no use.
    Or what am I doing wrong.
    Setup of twirl is working. This will tweet from me via command line:
    twurl -d ‘status=henk testing’ /1.1/statuses/update.json

    So that seems to be ok. Any ideas?
    Latest OSX and Keynote.

  3. Right!!
    So I went into the script, renamed it and saved it on my desktop. Compiled and exported as app. Rebooted machine.
    Works.
    Still, I have no idea what that error is – the command macerror -67049 from the terminal reveals nothing either, returning an error in itself.

      1. Good to know. This is on my MBPro, security settings high as I travel with it a lot.
        Again, thanks for the app. Great to use during lecturing.
        H

  4. Hi Alan!

    Just wanted to say THANK YOU for putting this little app together. This will definitely be something I use during my lectures. If it’s ok, I’d love to share this app with a large community of medical educators (#FOAMed on Twitter) who I’m sure would LOVE to use this also.

    I’m putting together a “how-to” article to show physicians how to install and use the app on a medical blog I write for – iTeachEM.net. I’ll make sure to put your name and site in the credits. Thanks again!

    — John Greenwood

    1. Thanks John- I am overdue to write a revised set up article.. probably will get a chance soon when I replace my hd and do a clean system install.

      Glad to hear it is useful- it’s a bit tricky on the setup but well worth having in your bag of tricks

  5. Your assistance is greatly appreciated.
    I am getting a Keynote Tweet 2.5 app error:
    Can’t get <> of document 1 of application “Keynote”. I think this is causing tweets to not send.

    Thank you for your help!

Leave a Reply to Alan Levine aka CogDog Cancel reply

Your email address will not be published. Required fields are marked *