One of my art projects for 2014 has been Bot Collective — an ongoing project where I make Twitterbots that "live" on the Raspberry Pi and have physical bodies. I've defintely become familiar with how to make a Pi into a Twitter engine and want to share my knowledge.
I'd like to see many Bot Friends in the Twitterverse.
This Instructable will show you how to set up your Raspberry Pi to send Twitter messages.
I learned most of this from this makeuseof guide, which was nearly complete. I wanted to cover the additional steps of setting up your application via Twitter. But the rest of this guide has been invaluable to me.
Before doing this Instructable, please make sure you have your Raspberry Pi up and running, which you can do with The Ultimate Raspberry Pi Configuration Guide Instructable.
I'm using the Mac OS for this guide, but you can extend the principles to other operating systems.
Step 1: Install Twython packages
Open the Terminal window and on the command line, type:
ssh firstname.lastname@example.orgIf you are running directly hooked into the monitor, you can skip this step.
Run the latest package updates and upgrades, just to make sure everything is current — you will have to have wifi access for this step. Type in the commands:
sudo apt-get update sudo apt-get upgradeThere will be a lot of waiting and Linux garble, so take break and pet your cat. Now, install the Twython libraries, which will let you use Twitter from Python using these three commands:
sudo apt-get install python-setuptools sudo easy_install pip sudo pip install twythonYou'll see more Linux stuff and then you should be good to go.