This is expected behavior. If you want to login automatically, you need to investigate client login.
Normally external users don't want to provide you with the credentials for their Google accounts. Ray On Thu, Nov 6, 2008 at 9:52 AM, ssr <[EMAIL PROTECTED]> wrote: > > Thanks for the response. > > When I loaded the file as file://c:/dev/htdocs/xxx.html, I was getting > the error messages I explained in my previous message. If I load it as > http://localhost/xxx.html, the behavior is different. If the user is > not currently logged in, it brings up a screen to log me in. Once I > login, I then get another screen that prompts me to grant the access. > Once I click on "Grant Access" button, it finally displays the feed > title. Is this the expected behavior? Also, is there a way to login > and grant access pragmatically? > > Thanks. > > On Nov 5, 3:38 pm, Trevor Johns <[EMAIL PROTECTED]> wrote: >> On Wed, Nov 5, 2008 at 12:00 PM, ssr <[EMAIL PROTECTED]> wrote: >> >> > I copied the following code from javascript client library >> > documentation into my web page to test how authentication works: >> >> > function getGoogleCalendar() { >> > var myService = new google.gdata.calendar.CalendarService('GoogleInc- >> > jsguide-1.0'); >> > var token = google.accounts.user.login("http://www.google.com/ >> > calendar/feeds/"); >> > myService.getEventsFeed("http://www.google.com/calendar/feeds/ >> > default/private/full", handleMyFeed, handleError); >> > } >> >> > function handleMyFeed(myResultsFeedRoot) { >> > alert("This feed's title is: " + >> > myResultsFeedRoot.feed.getTitle().getText()); >> > } >> >> > function handleError(e) { >> > alert(e.cause.statusText); >> > // alert(e.cause ? e.cause.statusText : e.message); >> > } >> >> > google.load("gdata", "1"); >> > google.setOnLoadCallback(getGoogleCalendar); >> >> > When I try to load this page, I am getting alert "Request via script >> > load timed out. Possible causes: feed URL is incorrect; feed requires >> > authentication" and when I close the alert box, I then get the >> > following message in the browser window: >> >> > "The page you have requested cannot be displayed. Another site was >> > requesting access to your Google Account, but sent a malformed >> > request. Please contact the site that you were trying to use when you >> > received this message to inform them of the error. A detailed error >> > message follows:" >> >> > "The "next" parameter was bad or missing." >> >> > Is anything wrong with the above code and how to fix the issue? >> >> > Any help would be appreciated greatly. >> > Thanks. >> >> Hm, it looks correct to me. >> >> Can you post a public sample page that would allow us to reproduce the >> problem? >> >> -- >> Trevor Johns > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Calendar 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-calendar-help-dataapi?hl=en -~----------~----~----~----~------~----~------~--~---
