I wrote this when Twitter swithed to V1.1.  Because the library I was using at the time didn't seem to want to work with the Authentication process, I decided to write my own... and then some additional pieces including timeline, showuser, and update status functions.  When authenticating, this example creates a hidden webbrowser, clicks the buttons for you, parses out the pincode, and then verifies in the background.  Just in case you were wondering...