I have successfully implemented an oauth sequence in a test app. It follows the typical authentication process using Twitter's authentication web pages:
> The Twitter authentication web page loads and the user grants the app access (all ok).
> The next page loads and presents a pin that is used in the app to complete the authentication.
However, as soon as the pin page appears the titanium app crashes with the following errors:
2010-07-16 11:37:39.014 iPad Example[6082:1803] -[DOMHTMLElement setHref:]: unrecognized selector sent to instance 0x65bc600
[ERROR] The application has crashed with an unhandled exception. Stack trace:
0 CoreFoundation 0x03990850 exceptionPreprocess + 96
1 libobjc.A.dylib 0x03aab32c objc_exceptionthrow + 44
2 CoreFoundation 0x03992a5b -[NSObject doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x0390f676 forwarding_ + 918
4 CoreFoundation 0x0390e9f2 _CF_forwarding_prep_0 + 50
5 DataDetectorsUI 0x0db7c3d8 -[DOMDocument(DDExtension) dd_urlifyResults:operation:] + 3255
6 DataDetectorsUI 0x0db76cb8 -[DDDetectionController doURLificationOnWebThreadAndRelease:] + 543
7 CoreFoundation 0x0390ea5d invoking___ + 29
8 CoreFoundation 0x0390e93a -[NSInvocation invoke] + 154
9 WebCore 0x040c2723 _ZL15HandleAPISourcePv + 147
10 CoreFoundation 0x038e05fa CFRunLoopRunSpecific + 3402
11 CoreFoundation 0x038df8a8 CFRunLoopRunInMode + 88
12 WebCore 0x0404d633 _ZL12RunWebThreadPv + 467
13 libSystem.B.dylib 0x950da81d _pthread_start + 345
14 libSystem.B.dylib 0x950da6a2 thread_start + 34
2010-07-16 11:37:39.015 iPad Example[6082:1803] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[DOMHTMLElement setHref:]: unrecognized selector sent to instance 0x65bc600'
2010-07-16 11:37:39.016 iPad Example[6082:1803] Stack: (
terminate called after throwing an instance of 'NSException'
[INFO] Application has exited from Simulator
It's a simulator issue.
I had similar issues, so I developed BirdHouse which works cross-platform and is up to date. So, this isn't an answer exactly, but perhaps you can get it to work instead:
About: The script can send tweets, retrieve tweets, authenticate, "deauthenticate", and send custom API calls to Twitter. For sending tweets, a custom UI popup appears. It is designed to work similar to Titanium's Facebook module.
David Riccitelli's oauth-adapter doesn't work on Android, but some have forked it to work, such as Ketan Majmudar (go here for his code), I have tried other OAuth scripts as well, but I have been more successful with BirdHouse.