Hi there.

I'm trying to use the sample code from

http://code.google.com/apis/gdata/client-js.html

to connect to calendar via gdata in javascript.  I keep getting the
error:

The "next" parameter was bad or missing.

from

https://www.google.com/accounts/AuthSubRequestJS?session=1&scope=http://www.google.com/calendar/feeds/[EMAIL
 
PROTECTED]/private/full&next=file%3A%2F%2F%2FC%3A%2FDocuments%2520and%2520Settings%2Ftv%2FDesktop%2Flearning_gdata.html

Does anyone know what I'm doing wrong?  I include my code below.

Thanks,
Theo

PS: here is the code, hopefully with identifying details stripped:

<html>

<head>
<script type="text/javascript"
  src="http://www.google.com/jsapi?key=my_api_key";>
</script>

<script>
google.load("gdata", "1");

</script>

</head>

<body>
<h1> Learning
<a href="http://code.google.com/apis/gdata/overview.html";>GData</a>
</h1>

<script>

var feedUrl =
  "http://www.google.com/calendar/feeds/
[EMAIL PROTECTED]/private/full";

function logMeIn() {
  scope = "http://www.google.com/calendar/feeds";;
  var token = google.accounts.user.login(scope);

  // The "next" parameter was bad or missing.
}

function logMeOut() {
  google.accounts.user.logout();
}

function setupMyService() {
  var myService =
    new google.gdata.calendar.CalendarService('exampleCo-
exampleApp-1');

  // not sure if I need to specify a different name than exampleCo-
exampleApp-1 here...

  logMeIn();
  return myService;
}

function getMyFeed() {
  myService = setupMyService();

  myService.getEventsFeed(feedUrl, handleMyFeed, handleError);
}

function handleMyFeed(myResultsFeedRoot) {
  alert("This feed's title is: " +
    myResultsFeedRoot.feed.getTitle().getText());
}

function handleError(e) {
  alert("There was an error!");
  alert(e.cause ? e.cause.statusText : e.message);
}

google.setOnLoadCallback(getMyFeed);

logMeOut();

</script>

</body>


</html>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google 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-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to