Threaded tweeting from Keynote for conference talks using #rtweet
I have been using Keynote Tweet, an app maintained by Alan Levin for several years now to send automated tweets during conference presentations.
Most journalism conferences have active backchannel discussions (almost all on Twitter) so it is like magic to drop links and footnotes into that discussion while on-stage presenting.
Keynote Tweet uses AppleScript to pull text from your presenter’s notes on each slide, and sends the updates to the internet using Twurl.
I pulled out the app last month for an event at the New York Press Association and after sending 40 updates realized that, as built, it does not support tweet threading. So each of my updates was a separate object, making it difficult for people to follow.
Luckily, my office at the Missouri School of Journalism is next to Dr. Mike Kearney, the developer of rtweet, a fantastic tool for analyzing and working with Twitter.
So, after just a bit of work and much Googling, I adapted Keynote Tweet to support rtweet with threaded replies.
I will eventually get this documented more carefully but for now, some brief instructions and the updated code are below. Apologies but these are Mac-centric (after all it is Keynote-based) and the entire thing has only been tested on OS 10.14.
RequirementsR for Mac OS X
R Studio
Rtweet
Twitter developer account and app
Script Editor, Terminal, Keynote — on your Mac
keynote.R — R script provided below
Keynote rTweet — AppleScript provided below
You will need to know how to get R and rtweet installed correctly — it is not enormously difficult and the links above provide details.
Once both are installed, the basic directions from Mike to set up rtweet to access your Twitter account are:
1.Create an app in Twitter
To gain access Twitter’s APIs, first go to apps.twitter.com and create a new app by completing the form fields. Approvals may take a day or two.
(note: you must enter the value for Callback URL exactly as it appears below.)
Name: Name of Twitter app e.g., my_keynote_app
Description: Describe use case e.g., for tweeting from Keynote
Website: A valid website e.g., https://twitter.com/kearneymw
Callback URL: http://127.0.0.1:1410
Check yes if you agree and then click “Create your Twitter application”
2. Set the access token:
In R Studio — create a new session and from the command line create a token and save it as an environment variable by copy/pasting the below — using your own keys — the ones below are fake.https://medium.com/media/1c8186363ea3324ab4c32a055276b4c8
And that’s it!
In R Studio, create a new file and copy/paste the following code. Name it keynote.R
and save it somewhere convenient and permanent. You should not need to modify the code. (View raw to copy)
Find Script Editor on your Mac and create a new file. Copy/paste this code:
In this code (on line 59)
you will need to change the path to ‘rscript’
and the path to the keynote.R
file that you created.
Compile the script (the hammer icon at top of the Script Editor window) and then export that file as an application and click ‘stay open after run handler’
Name it anything convenient like Keynote rTweet
and save it somewhere easy like ‘Applications.’ This is the part of the app you will actually need access to on a regular basis.
Open up Keynote and create a title slide. Then create a content slide, select ‘show presenter’s notes’ and enter:
[twitter]Test of Keynote rTweet[/twitter][first]
The “[first]”
at the end is important so the app knows to start a new thread.
Create a third slide and enter:
[twitter]Keynote rTweet with threaded replies works[/twitter]
Find the Keynote rTweet
AppleScript App and run it. It will show some instructions and ask if you want to use a hashtag. On the initial run it will also ask permission to control Keynote — say “yes.”
Switch back to Keynote and run the presentation. The script picks up the status text when you change slides.
Page through your three slides and then check Twitter. If everything worked, you should see the updates. If not, you may need to dig into some of the details provided at the links above. But trust me that it does work and it is worth some effort to get it running on your Mac.
Happy tweeting.
Member discussion