I am generating a new session token each time because I have the if
($_GET['token']) to check whether or not the user is being redirected
to my site via Google following authentication.

Is what I'm doing not the right way to approach this?

On Jan 30, 8:51 am, Tom Wilson <[email protected]> wrote:
> Is a session token is just that for the active session ? once the user
> leaves a new session token is required.
>
> Tom Wilson
> Freelance Google Base Developer and Consultantwww.tomthedeveloper.com
>
> Google Base Tools -http://dev.tomthedeveloper.com/googlebase
> Featured Project 
> :http://google-code-featured.blogspot.com/2008/02/google-base-competit...
>
> On Jan 29, 10:07 pm, Mike P <[email protected]> wrote:
>
> > I began started working with the Google Base Data API, and I've run
> > into a mysterious error.
>
> > My application (PHP based) works fine the first time a user authorizes
> > my application to access the data on their Google Account.  I then
> > receive the token and exchange it for a non-expiring session token.
>
> > The problem arises whenever a user revisits my application.  When my
> > application tries to read the items feed, I get the following
> > response:
>
> > <errors>
> > <error type="request" reason="Service not found"/>
> > </errors>
>
> > Regardless of whether I generate a new session token or reuse the
> > previous one, I get the above error.
>
> > Can anyone offer advice for tackling this problem?
>
> > (The code below handles my session tokens)
>
> > if($_GET['token']) {
> >         $old_token = $_GET['token'];
> >         $ch = curl_init();
>
> >         curl_setopt($ch,CURLOPT_URL,'https://www.google.com/accounts/
> > AuthSubSessionToken');
> >         curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
> >         curl_setopt($ch,CURLOPT_FAILONERROR,true);
> >         curl_setopt($ch,CURLOPT_HTTPHEADER,array('Authorization: AuthSub
> > token="'.$old_token.'"'));
>
> >         $result = curl_exec($ch);  /* Execute the HTTP command. */
>
> >         //parse output
> >         $splitStr = split("=",$result);
> >         $token = trim($splitStr[1]);}
>
> > else {
> >         $token = 'previous session token';
>
> > }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Base Data API" 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-Base-data-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to