Figured out more. I believe the problem with not being able to fetch data from the session is related to the fact that the GWT browser launches with localhost as the default url... i then map mysite to my loop back address(via /etc/hosts)... so when authentication succeeds the user gets routed back to my localhost via mysite address... even though i am only testing locally... the problem is... that somehow the session is tied to the domain name. when i start a session from mysite.com:8080 and have all subsequent callbacks and navigation off of mysite.com... the session storage works and i am able to authenticate and fetch the user data with the authenticated token.
Long story short... the session state is somehow tied to the domain name, so be careful when going from localhost to something else (probably for the callback from twitter) _stream On Aug 30, 4:51 am, Stream <[email protected]> wrote: > I advanced on this a bit... you just need to have the server generate > the request url... then pass that back to the client... let the client > click on that and authenticate... that will cause twitter to redirect > to your site... (you'll need to edit your host file if you are testing > locally... since twitter only redirects to valid url's) > > Now I am stuck on how to persist data across requests. I tried using > the session state, however the object isn't being persisted across > requests ... perhaps because the twitter callback is considered a new > session? a bug in app engine? > > This is how i write: > this.getThreadLocalRequest().getSession(true).setAttribute > ("RequestToken", requestToken); > > This is how i read: > RequestToken requestToken = (RequestToken)this.getThreadLocalRequest > ().getSession(true).getAttribute("RequestToken"); > > anyone know whats wrong? > > On Aug 24, 11:12 pm, Some Dude <[email protected]> wrote: > > > Same here. I am completely confused on how to use twitter4j + app engine + > > gwt! > > > Anyone? > > > On Sunday, August 23, 2009, Jeune <[email protected]> wrote: > > > > Hi all! > > > > Has anyone of you tried using twitter4j in appengine? I am a bit stuck > > > and the code examples on their website isn't helping me very much at > > > all. I am struggling to find a way to use it using servlets etc > > > because the code examples are in a main method. > > > > I delineate my problem more in a post I made here: > > >http://stackoverflow.com/questions/1318840/right-way-to-use-twitter4j... > > > > Any insight would be greatly appreciated! > > > > Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
