Sample code to automate the basic to oauth credentials exchange

8 views
Skip to first unread message

jon

unread,
May 7, 2009, 11:17:48 AM5/7/09
to Twitter Development Talk
Hi,

We recently converted our site to use twitter oauth over basic
authentication and automated the exchange of credentials so that we
didn't have to keep multiple workflows around nor bother our users.

Here's a helpful script in ruby which makes use of the great twitter
and mechanize gems.
(this is obviously a little bit brittle, so I wouldn't rely on it for
anything other than batch conversion)

Also, the script makes multiple http calls to twitter and is subject
to timeouts, backhoes, and other ill effects, so expect it to be slow
and fail often. We loaded up pending conversions into a persistent
transactional queue and ran multiple processes in parallel.

http://gist.github.com/108144

- Jon
Reply all
Reply to author
Forward
0 new messages