Skip navigation

I updated my Python Oauth Client Library so that it actually works now!

Here’s an example of how to use it:


(using Twitter)

def myCallback ( data ):
  print "data: %s" % data

c = oauthConsumer.Client( consumerKey, consumerSecret, requestTokenURL, accessTokenURL, authorizeURL, "" )
c.requestAuth( myCallback )
c.requestSession( oauth_token, oauth_verifier, myCallback )
#data: oauth_token=20687908-snoIXOqT7StBdYtyeatV0fAzxLTB0DYklIgBh8klx&o...
print c._sessionSecret
print c._sessionToken

Now make requests via createRequest

update = c.createRequest( path="/statuses/update.json", callback=myCallback) = { "status":"testing pyoauthconsumer oauth client python library I'm working on" } )
#data: {"truncated":false, ... }

You can see the post made with this example here.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: