We love being social. Fortunately, our boss does, too, which means that we are encouraged to use social networks like Facebook and Twitter at work. It has come to our attention that there are other companies where being social is not appreciated quite as much. Imagine sitting in a boring cubicle office with lots of boring colleagues. You can’t use Twitter, Tweetdeck or any other mechanism to be social online because your colleagues or your boss would get really upset with you. Imagine that you then, all of a sudden, find this incredibly funny memes you want to share! What should you do?
Well, we have the solution for you and it is called Tweetsheets aka “Use Twitter directly in your Google Doc, so no one will ever blame you for being social again”!
You remember our annual summercamp, where we built lots of crazy stuff? 4 weeks ago I wrote about a mechanism to automatically share your e-mails in your facebook stream. That was not our only spreadsheet-based project: One nightly coding session, Tweetsheets was born. We we’re really impressed how fast the client was finished. Everything you need is provided by Google Apps Script, even the OAuth-part! Lovely!
You are now probably wondering: “How do I get Tweetsheets?”. The good news is: You don’t have to install anything. Just copy/paste our code directly into your Google Spreadsheet. The bad news: There is no bad news!
Here’s what you have do do:
How to install Tweetsheets
- Create a Twitter App at https://dev.twitter.com/apps/new (all settings up to; you need read/write access; callback url has to be https://spreadsheets.google.com/macros) *
- Write down your Consumer key and Consumer Secret
- Go to your Google Drive (formerly known as Google Docs) and create a new Spreadsheet
- Go to “Tools” -> “Script Editor” >” Blank Project”
- Paste the code from https://gist.github.com/3303060 into the Script Editor
- Paste Consumer Key and Consumer Secret from (2) into the first two lines
- From within the Script Editor go to “Run” and choose “authorize”;
- Confirm the Google/Twitter Authentication dialog
- Save everything and close the Script Editor and Google Spreadsheet
- Reopen your Spreadsheet – a new Menu Item “Tweetsheet” is now available
- Update your home timeline by clicking on “Tweetsheet” -> “Refresh timeline” Boom!
From now on, feel free to update your timeline, based on your stress-level at work. For the really busy ones: You can fetch your timeline on a time-based level. Go to Script Editor > “Resources” > “Current script trigger’s” and add a time-based trigger for the “refreshTimeline” action. My copy of Tweetsheets, for example, has been running for almonst 4 weeks with automatic updates every minute!
Is that all? I can only read my Twitter home timeline in a spreadsheet?
Nooooooo! Tweetsheets is not read-only. You can, of course, tweet as well! Just click on “Tweetsheet” in the menu bar and choose “Tweet”.
Enter your tweet text (e.g. “Wow, just stumbled upon this nice blog post from @jollife: He realised a twitter client directly in google docs”, or “the lulz. look what funny facebook memes @diesocialisten made!”). Hit the “Send tweet” button and there you go: Boom! You just published your first tweet from a spreadsheet.
But wait, there’s more!
Retweet, Reply, Fave. It’s all there! You only need to know how:
- Head over to the column right after the tweet you’re interested.
- Choose your action:
- Enter “<3” for fave.
- Enter “RT” for Retweet.
- Enter “reply” for reply.
But be quick: If the timeline refreshes while you are typing, you might just fave the wrong tweet. Let me get this straight: I am not responsible for any future girl- or boyfriend trouble you might get for faving other girls’ (or boys’) tweets!
Here’s your task for today: Get yourself this perfect, boring-looking, but super awesomely coded Twitter client in 11 easy steps (see above)! Now you can be social again!
As I have already told you, we at Die Socialisten love being social (it’s even in our name!). So we wanted to share with you the raw emotions that erupted when the first tweet published via Tweetsheets (the noisy and funny part starts at 00:40).
We’re not sure why, but retweeting and faving doesn’t work reliably all the time. We haven’t figured out why, but maybe YOU know the answer? Feel free to fork the code, or to use it in your own projects. We would love to hear feedback from you. Have fun with it: https://gist.github.com/3303060 (yeah, a complete twitter client with read, write, fave, retweet, reply in only 240 lines of code! yiiiha!)
Do you know other fun uses for a Google Docs or Excel environment? Tell us in the comments!
If you’re not using Google spreadsheets but have Excel and Python installed: Have a look at Victors implementation for Excel!
Like this hack? Become a fan to get regular updates on cool Facebook- or Twitter-hacks…
*) If you can’t create an app for yourself, feel free to contact me! @jollife