Closing Window Error on Device
Hello,
I am using Spazcore api to get Twitter access token and secret here is what I am doing.
- 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.
- Then Titanium opens a webview and authorization will take place, on success webview will fireback access token and access secret to the parent window.
- 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?
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.
https://appcelerator.lighthouseapp.com/projects/32238/tickets/1412-iphone-usernamepass-on-url-https-only-will-break
http://builds.appcelerator.com.s3.amazonaws.com/index.html
-
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.
http://developer.appcelerator.com/question/4581/custom-module
But if you are still interesting in webview with oAuth implementation, try this.
http://developer.appcelerator.com/blog/2010/07/twitter-oauth-implementation-for-titanium-mobile.html -
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.
Thanks.