Hey Lasheimok, I think you have the right idea, and your code looks right to me. So when you come back from AuthSubJS, your token is upgraded properly? (the page refreshes and the #TOKENBVALUE is removed from the URL) It may be that you're querying a feed before the token cookie has been set.
Also try deleting cookies and running the app again. Eric On Dec 3, 10:51 am, lasheimok <[EMAIL PROTECTED]> wrote: > Hi Eric, > > I tried, but I'm stuck with the AuthSub token. Seems there's something > that I misunderstand completely. :) > > [some code] > > var scope = "http://docs.google.com/feeds/"; > var docListUrl = "http://docs.google.com/feeds/documents/private/ > full"; > > function fetchData () { > if (google.accounts.user.checkLogin (scope)) { > docList = new google.gdata.client.GoogleService ('google-service', > 'gdata-doclist-test'); > docList.getFeed (docListUrl, handleFeed, handleError); > } else { > token = google.accounts.user.login (scope); > } > > } > > google.load ("gdata", "1"); > google.setOnLoadCallback (fetchData); > > [/some code] > > The handleError function is called and receives the complain "Token > invalid - Invalid AuthSub token." > > I assumed the checkLogin function would check for a valid login? For > some reason it returns a token, but it doesn't seem to be valid. > > I tried both leaving the login to the JavaScript client library, and > logging in first with a link like > > https://www.google.com/accounts/AuthSubRequest?scope=http%3A%2F%2Fdoc...... > > Same result. The checkLogin function returns a token, but the getFeed > function leads to an error. > > I'd be grateful for any hint what I'm doing wrong. :) > > Lasheimok > > On Dec 2, 3:33 pm, "Eric (Google)" <[EMAIL PROTECTED]> wrote: > > > Hi Lasheimok, > > > My last post here should > > help:http://groups.google.com/group/Google-Docs-Data-APIs/browse_thread/th... > > > You can use the generic google.gdata.client.GoogleService() and query > > feeds using getFeed(). > > > Also note, that if the spreadsheet feed is public, you can use > > alt=json or alt=json-in-script&callback=yourJSFunction without needing > > the library:http://code.google.com/apis/gdata/json.html > > > Eric --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Docs Data APIs" 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-Docs-Data-APIs?hl=en -~----------~----~----~----~------~----~------~--~---
