github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

harperreed / twitteroauth-python

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 27
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Python Oauth client for Twitter — Read more

  cancel

http://code.google.com/p/twitteroauth-python/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

added some info to the readme 
harperreed (author)
Sat Feb 21 22:36:04 -0800 2009
commit  0e466938501240af7f1623c82159045faba3be56
tree    343e82b63c40e0d2fd89d30eda1dc2a8bc405969
parent  4272b448881ac3e7d4e94812694580083d936c89
twitteroauth-python /
name age
history
message
file README Sat Feb 21 22:36:04 -0800 2009 added some info to the readme [harperreed]
file client.py Sat Feb 21 22:08:21 -0800 2009 changed some comments and what not on client.py... [harperreed]
directory oauth/ Sat Feb 21 19:14:08 -0800 2009 First commit of twitteroauth-python. i am serio... [harperreed]
README
Python Oauth client for Twitter
---------

I built this so that i didn't have to keep looking for an oauth client for twitter to use in python. 

It is based off of the PHP work from abrah.am (http://github.com/poseurtech/twitteroauth/tree/master). 
It was very helpful. 

I am using the OAuth lib that is from google gdata. I figure it is a working client and is in production use - so it 
should be solid. You can find it at:
http://gdata-python-client.googlecode.com/svn/trunk/src/gdata/oauth

With a bit of modification this client should work with other publishers. 

btw, i am a python n00b. so feel free to help out. 

Thanks,
harper - harper@nata2.org (email and xmpp)


-----------
Links:

Google Code Project: http://code.google.com/p/twitteroauth-python/
Issue Tracker: http://code.google.com/p/twitteroauth-python/issues/list
Wiki: http://wiki.github.com/harperreed/twitteroauth-python

-----------

The example client is included in the client.py. It is:

if __name__ == '__main__':
    consumer_key = ''
    consumer_secret = ''
    while not consumer_key:
        consumer_key = raw_input('Please enter consumer key: ')
    while not consumer_secret:
        consumer_secret = raw_input('Please enter consumer secret: ')
    auth_client = TwitterOAuthClient(consumer_key,consumer_secret)
    tok = auth_client.get_request_token()
    token = tok['oauth_token']
    token_secret = tok['oauth_token_secret']
    url = auth_client.get_authorize_url(token) 
    webbrowser.open(url)
    print "Visit this URL to authorize your app: " + url
    response_token = raw_input('What is the oauth_token from twitter: ')
    response_client = TwitterOAuthClient(consumer_key, consumer_secret,token, token_secret) 
    tok = response_client.get_access_token()
    print "Making signed request"
    #verify user access
    content = response_client.oauth_request('https://twitter.com/account/verify_credentials.json', method='POST')
    #make an update
    #content = response_client.oauth_request('https://twitter.com/statuses/update.xml', {'status':'Updated from a python 
    oauth client. awesome.'}, method='POST')
    print content
   
    print 'Done.'

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server