Hi Alessandro,

I think something else is tied between the session and the url you are
using. For my specific problem I need to make sure my requesting url
(before having the user click on the link) matches the callback url
for the on successful authentication.

If you are programming with app engine and gwt... the test browser
launches with the localhost:8080 url... if you use that and then click
on an auth link for twitter then twitter needs a valid url to
callback ... so that will be something like www.foo.com... this doesnt
work for durable sessions... for this to work you have to set www.foo.com
to your loopback address locally... then access the gwt hosted browser
via www.foo.com and then have the callback from twitter also go to the
www.foo.com domain...

setting getSession(false) or getSession() doesnt solve the problem
described above.

_stream

On Aug 30, 10:54 am, "Alessandro Loche" <alessandro.lo...@gmail.com>
wrote:
> I answered your question in a previuos post. If you use getSession(true)
> you'll create a new session. You should pass false or no argument to method,
> instead.
>
> --------------------------------------------------
> From: "Stream" <streamofc...@gmail.com>
> Sent: Sunday, August 30, 2009 1:51 PM
> To: "Google App Engine" <google-appengine@googlegroups.com>
> Subject: [google-appengine] Re: Using Twitter4j in AppEngine
>
>
>
> > 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 <streamofc...@gmail.com> wrote:
> >> Same here. I am completely confused on how to use twitter4j + app engine
> >> + gwt!
>
> >> Anyone?
>
> >> On Sunday, August 23, 2009, Jeune <jose.asunc...@gmail.com> 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 google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to