4 messages in com.googlegroups.google-picasa-data-apiRe: Invalid token| From | Sent On | Attachments |
|---|---|---|
| reymargooding | 25 Nov 2007 06:03 | |
| Ryan Boyd (Google) | 25 Nov 2007 09:46 | |
| reymargooding | 26 Nov 2007 09:05 | |
| Ryan Boyd (Google) | 26 Nov 2007 09:22 |
| Subject: | Re: Invalid token![]() |
|---|---|
| From: | reymargooding (reym...@gmail.com) |
| Date: | 11/26/2007 09:05:30 AM |
| List: | com.googlegroups.google-picasa-data-api |
Hey, thanks, it worked like a charm. I figured it was something like that i was missing but wasn't able to pin point exactly what I needed to do. Seems like most of the important documentation is really burried!!!
Thanks again!
On Nov 25, 9:46 am, "Ryan Boyd (Google)" <api....@google.com> wrote:
Hi,
The SetAuthenticationToken method sets the authentication token in the current authentication factory. By default, I believe the authentication factory is ClientLogin. In order to have this code work, you'll need to change the authentication factory to be the GAuthSubRequestFactory.
Please see the following
page:http://code.google.com/p/google-gdata/wiki/AuthSubSupport
If we take the example from that page, and apply it to your code above, we come up with: GAuthSubRequestFactory authFactory = new GAuthSubRequestFactory("lh2", "MyApp"); authFactory.Token = sessionToken; PicasaService s = new PicasaService(authFactory.ApplicationName); s.RequestFactory = authFactory; AlbumQuery query = new AlbumQuery(PicasaQuery.CreatePicasaUri("default")); PicasaFeed picasaFeed = s.Query(query);
Cheers, -Ryan
On Nov 25, 2007 6:03 AM, reymargooding <reym...@gmail.com> wrote:
I've am trying to access the currently logged in user's album list but i keep getting the error (500) Internal Server Error, and when I inspect the response, it tells me Invalid token.
My App is in ASP.NET 1.1 and i'm using the GData client library. I've followed the steps correctly to authorize a user and get a sessionToken in the AuthSub and GData client library documentation, that is, using the getRequestUrl, getTokenFromReply, exchangeForSessionToken, and setAuthenticationToken.
Here's the code I use: PicasaService s = new PicasaService("MyApp"); s.SetAuthenticationToken(sessionToken); AlbumQuery query = new AlbumQuery(PicasaQuery.CreatePicasaUri("default")); PicasaFeed picasaFeed = s.Query(query); //ERROR IS THROWN HERE
What am I missing? I've tried it on my local machine and my remote server but it still gives me the same error.- Hide quoted text -




