Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Twitter oAuth pin page crashes app

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: (
60360784,
61518636,
60369499,
59831926,
59828722,
230147032,
230124728,
59828829,
59828538,
67905315,
59639290,
59635880,
67425843,
2500700189,
2500699810
)
terminate called after throwing an instance of 'NSException'
[INFO] Application has exited from Simulator

Any thoughts?

— asked July 15th 2010 by Geoff Hinchcliffe
  • oauth
  • twitter
  • webpage
0 Comments

2 Answers

  • It's a simulator issue.

    — answered July 16th 2010 by Ramy Talal
    permalink
    0 Comments
  • 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:

    Go here for the code and go here for the test app.

    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.

    — answered April 19th 2011 by Joe iEntry
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.