Hardware Reference
In-Depth Information
he inal step is to install the python-twitter module:
wget “http://python-twitter.googlecode.com/files/;
python-twitter-0.8.2.tar.gz”
tar xvf python-twitter-0.8.2.tar.gz
cd python-twitter-0.8.2
python setup.py build
sudo python setup.py install
cd ..
If you have IDLE open, close all the windows and restart it so it can access the newly installed
modules.
Talking to Twitter
Twitter requires programs that access it automatically to send authentication information
with requests. his allows Twitter to prevent abuse by blocking programs that put too much
load on its servers. Your program will authenticate itself to Twitter by sending secret tokens.
Getting Access Tokens for Twitter
You will need to get four pieces of information by signing into the developers' part of Twitter.
his section explains how to get a consumer_key , consumer_secret , access_token_
key and access_token_secret . he names sound confusing, but all they are is a secret
code that will identify you and your program to Twitter.
Visit https://dev.twitter.com/apps/new and log in. (You will need to sign up to
Twitter if you don't have an account.) If you're not old enough to have your own Twitter
account you could ask a parent, guardian or teacher to do this for you.
Enter the name of your application, a brief description and a website. If you don't have a
website you could enter www.example.com as a placeholder. Read the terms and click to
indicate your acceptance of the terms. Fill in the CAPTCHA and then click Create Your
Twitter Application. You may need to enter a diferent name for your application if it is
already in use; you could try preixing it with your Twitter username.
Upon success, scroll down and click Create My Access Token. Wait up to a minute and reload
the page.
Make a note of the Consumer Key and Consumer Secret entries from the OAuth section, and
Access Token and Access Token Secret from the Your Access Token section because you will
need to include these in your program.
Search WWH ::




Custom Search