28 Feb
Posted by Harper as Technology at 05:04 PM
Tags: appengine, oauth, python, twitter
I built Excla.im quite awhile ago, well before Twitter unleased their oauth beta program. Regardless, Chris Messina tagged the Excla.im sign up process as an anty pattern within his flickr stream. I was bummed because i would have loved to use Oauth to authenticate Excla.im. But because of the tagging, i was constantly thinking about how to remove the anti pattern.
Finally, Twitter released the Oauth Beta and I was able to bribe @Al3x to give me access (which reminds me, i need to send my bribe). I then sat for a month looking at the various python examples for OAuth and basically said “What The Fuck” over and over again. There were no solid examples and my experience with OAuth in PHP was a total hack so i could post shit to fireeagle. I was SOL as to finding a guide.
Then abrah.am released his PHP twitter OAuth lib. It worked really well and was pretty much just plug and play to use it in a PHP app. Nice. I wanted that but in python. I decided to spend a minute or two and create it.
The base library my client is using is the the OAuth lib from google gdata-python-client project. I figure it is a working client and is in production use – so it should be solid. There are very few changes between it and the official client that is released through oauth.net.
The client is rather simple, in fact it should work with other api providers with very little work. You can check it out at github. Please let me know feedback. i am a python n00b – so give me your best shot/code review. I am using Google Code as a issue tracker, so feel free to post some bugs.
It is rather pluggable. I was able to launch excla.im (on app engine) with oauth support in no time. I am currently not holding passwords for anyone. It is an awesome feeling.
2 Responses
iouwater
March 25th, 2009 at 4:41 am
1i got error:
Traceback (most recent call last):
File “client.py”, line 133, in
tok = auth_client.get_request_token()
File “client.py”, line 89, in get_request_token
raise oauth.OAuthError(‘Invalid oauth_token’)
oauth.OAuthError
how to fix it???
thx.
error of twitter oauth server ??
Harper
March 26th, 2009 at 11:35 am
2Either your Oauth Token is incorrect or twitter is returning something mysterious.
Probably both.
Be sure and take a gander at my photos.
If you want to contact me click here to start a chat.
Status
follow me on Twitter
Pictures
Friends
Popular Tags
action awesome blogs books bush cell chicago chris colorado crobar dylan family food games google hacking harper hiromi humor india insane internet iraq job juggle juggling matiss metal movies music nokia phone php politic reed rock school search server sick Sites Technology travel video war
search
Categories
Archives