Tested this with String nextUrl = "http://example.com/foo?bar=baz&qux=xyzzy"; String scope = "http://picasaweb.google.com/data"; System.out.println(AuthSubUtil.getRequestUrl(nextUrl, scope, false, true));
Which spit out https://www.google.com/accounts/AuthSubRequest?next=http%3A%2F%2Fexample.com%2Ffoo%3Fbar%3Dbaz%26qux%3Dxyzzy&scope=http%3A%2F%2Fpicasaweb.google.com%2Fdata&secure=0&session=1 Went through the approval step and got redirected to http://example.com/foo?bar=baz&qux=xyzzy&token=CI7GZuyXGxDjpPjB-v__8B So it looks like everything is working. The problem must be in how you are constructing the continueUrl. Cheers, -Jeff On Nov 18, 10:40 am, Silvia <[EMAIL PROTECTED]> wrote: > Here is the code I use to generate the AuthSub Url. It's in a jsp page > and I redirect it to my servlet after granting the access. > > StringBuffer continueUrl = request.getRequestURL(); > int index = continueUrl.lastIndexOf("/"); > continueUrl.delete(index, continueUrl.length()); > continueUrl.append("/PicasaServlet"); > String PicasaUrl = "http://picasaweb.google.com/data"; > String requestUrl = AuthSubUtil.getRequestUrl(continueUrl.toString > (),PicasaUrl,false,true); > String mensaje = "<p>Prefoto necesita acceder a tu cuenta de > Picasa para subir tus fotos. " + > "Para autorizar a Prefoto a acceder a Picasa, <a href=\"" + > requestUrl + "\">entra en tu cuenta</a>.</p>"; > out.println(mensaje); > > Thanks in advance Jeff, > Silvia > > On 18 nov, 19:29, Jeff Fisher <[EMAIL PROTECTED]> wrote: > > > Hi, > > > It should be possible to preserve a custom query parameter. Can you share > > the snippet of code you are using to generate the AuthSub URL? > > > Cheers, > > -Jeff > > > On Mon, Nov 17, 2008 at 11:55 AM, Silvia <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I have a web application that uses the API to upload photos to my > > > account. I log into my application and I request the user to grant the > > > access to my application. After that I enter to my home web page, but > > > I have lost my user parameter when I have been redirected to the Url > > > to grant the access. > > > > Is there any way to pass the user parameter through this call so that > > > I can reach my home page without loosing my user? > > > > Thanks and regards, > > > Silvia --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Picasa Web Albums 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-Picasa-Data-API?hl=en -~----------~----~----~----~------~----~------~--~---
