Pi Tweet

Wifi
Install wifi dongle for internet access on the Pi

Twitter/Tweepy
Tweepy is a Python library for accessing the Twitter API. In order to use the library, I first had to set up Authentication keys by signing up for the Twitter Developer account.

raspberry pi tweet

sample python tweepy script:
Tweet.py

#!/usr/bin/env python

import sys
import tweepy

#api keys from twitter
CONSUMER_KEY = 'XXXXXXXXXX'
CONSUMER_SECRET = 'XXXXXXXXXX'
ACCESS_KEY = 'XXXXXXXXXX'
ACCESS_SECRET = 'XXXXXXXXXX'

auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
api = tweepy.API(auth)
api.update_status(sys.argv[1])

terminal command:

python Tweet.py "Hello, from my Pi"