Titanium Community Questions & Answer Archive

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

Closing Window Error on Device


I am using Spazcore api to get Twitter access token and secret here is what I am doing.

  1. User enter twitter username and password and Titanium then fires event (which contains entered username and password) to a web view in which the authorization will take place.
  2. Then Titanium opens a webview and authorization will take place, on success webview will fireback access token and access secret to the parent window.
  3. And window contains webview will close down.

When I run the code in emulator everything works just fine but when I try it on device it is not closing down the window on authorization success.

Can anyone tell what could be the problem?

— asked August 2nd 2010 by Altaf Sayani
  • webview
  • window

3 Answers

  • Accepted Answer

    Oh, forgot to mention this : if you are using 1.4, you will have to patch the fixed TiUtils.m Otherwise, you'll need 1.4.1 (last link). You are fine, i guess, it's just the url escaping bug that's throwing you off.



    — answered August 2nd 2010 by Daniel Lim
    1 Comment
    • Thanks for the help Daniel, it works perfectly fine now.

      — commented August 3rd 2010 by Altaf Sayani
  • Not sure about Spazcore, but why inventing the wheel if there's already solutions out there for us?

    I'm using Twitter Xauth mentioned here, no pins and webview involved, fairly simple.


    But if you are still interesting in webview with oAuth implementation, try this.

    — answered August 2nd 2010 by Daniel Lim
  • Thanks for the help Daniel,

    but when I try running the code it gives me authentication needed error while I guess everything is setup correctly.

    Here is what my code looks like http://pastie.org/1071516

    Can you share the code which is working fine for you, would be really helpful.


    — answered August 2nd 2010 by Altaf Sayani
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.