ebryn / twitter-titanium

The easiest way to handle Twitter authentication in your Titanium Mobile app
75 stars 54 forks source link

Exception #1

Closed handelcamilo closed 13 years ago

handelcamilo commented 13 years ago

Hi, I'm using this API but I'm getting this error: "IllegalArgumentException: size < 0"

It happens at:

var Twitter = require('twitter').Twitter;

Thank you!

ebryn commented 13 years ago

Hey, can you provide more details about your environment?

Which version of Titanium, what OS, etc...?

handelcamilo commented 13 years ago

Hi ebryn, I resolved the issue, but I'm getting another one.

The "loading" message never disappear and webview never is loaded =/

Using Titanium Mobile 1.7.3 Windows 7 Android API 2.3.1. Example Project

ps: Sorry about my english.

ebryn commented 13 years ago

You're using the most up-to-date code, right? I just solved an issue like this.

handelcamilo commented 13 years ago

yes, I'm using the latest version!

ebryn commented 13 years ago

Have you filled out the OAuth keys?

handelcamilo commented 13 years ago

In first place, thanks so much for helping!! =D I'm filling just consumerKey and consumerSecret!

ebryn commented 13 years ago

Sorry, I'm having trouble understanding the situation. Are you having this issue with the consumerKey and consumerSecret them filled in?

handelcamilo commented 13 years ago

Yes, I'm filling both consumerKey and consumerSecret and the Loading Message never disappear and the WebView never is loaded. Do you want my code? I can send you by email or something!

ebryn commented 13 years ago

Post a link to a gist.

On Fri, Oct 28, 2011 at 12:11 PM, Handel Camilo reply@reply.github.com wrote:

Yes, I'm filling both consumerKey and consumerSecret and the Loading Message never disappear and the WebView never is loaded. Do you want my code? I can send you by email or something!

Reply to this email directly or view it on GitHub: https://github.com/ebryn/twitter-titanium/issues/1#issuecomment-2559945

handelcamilo commented 13 years ago

There it is:

http://codeviewer.org/view/code:1fbe

handelcamilo commented 13 years ago

I don't know why but now I'm getting a different issue. The WebView is loaded, but the Loading message never disappear and turn my application into a loop. My application is restarted every time WebView is loaded.

ebryn commented 13 years ago

Looks like you've moved the client.authorize() line below the last }. Might want to try moving it back to it's original location?

ebryn commented 13 years ago

Also, post a gist of your console log...

handelcamilo commented 13 years ago

I already moved the client.authorize() line below the last } and the problem persists.

The console log is:

http://codeviewer.org/view/code:1fbf

How I told you, the app get stuck in a loop. Whenever the WebView is loaded(aparently) the app is restarted.

Thanks!

ebryn commented 13 years ago

Your app.js works fine for me.

You're outside of the US, right? Does Twitter have a local domain or something that they redirect to instead of twitter.com? That could be the issue...

Try adding some debug code to the twitter.js file... find the line with: webView.addEventListener('load', function(event) {

And try adding this inside the callback function: alert(event.url);

handelcamilo commented 13 years ago

I'l try this. I'm from Brazil and here twitter doesn't redirect to anywhere. =/

handelcamilo commented 13 years ago

Hm, i added the alert(event.url) but it's not appear!

I'm putting console output again to you see where my app die ok?

Thanks!

ps: My code works with you?

ebryn commented 13 years ago

Your code worked fine for me, I'm going to close this issue... please reopen if you have more details.