Thursday, September 12, 2013

Basic Twitter Code using the Tweepy API

So this is a super simple script that allows me to tweet from the command line which is pretty cool! I call the file tweeter.py and can tweet by saying...

$sudo python tweeter.py 'Message I want to tweet'



I can't show you the sensitive information from Twitter for obvious reasons, but you should plug your information into those spots and it should work for you. You do need to visit the developer Twitter website to set up the API, link it to your account, and have they give you your appropriate numbers. Here is the tutorial I followed to get this done.

http://c-mobberley.com/wordpress/index.php/2013/04/26/raspberry-pi-connect-to-twitter-account-using-tweepy-installation-and-tweet-cpu-temperature-example/

No comments:

Post a Comment