Skip to content

Sample Python program that shows you how to correctly sign a request to the Twitter API

License

Notifications You must be signed in to change notification settings

kelsmj/twitter_signature

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twitter_signature

Sample Python program that shows you how to correctly authorize and sign a request to the Twitter API

This sample code is based on the Creating a Signature and Authorizing Request documents.

I assume you know how to generate the proper keys, tokens and secrets for your app

Setting up the environment:

$ git clone git://github.com/kelsmj/twitter_signature.git
$ mkvirtualenv twitter_signature
$ pip install -r requirements.txt
$ touch settings.cfg

Populate the settings.cfg with the following:

[Keys]
twitter_consumer_secret: YOUR_CONSUMER_SECRET
twitter_consumer_key: YOUR_CONSUMER_KEY
access_token: YOUR_ACCESS_TOKEN
access_token_secret: YOUR_ACCESS_TOKEN_SECRET

Run the program:

$ python twitter_signature.py

About

Sample Python program that shows you how to correctly sign a request to the Twitter API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published