In the following code, I print out the $newLink and past it into a FF
browser and I got a page that just says "Google error , Cannot access
the calendar you requested" Appreciate it if someone can help with
this.
$gdataCal = new Zend_Gdata_Calendar($client);
$query = $gdataCal->newEventQuery();
$query->setUser('default');
$query->setVisibility('private');
$query->setProjection('full');
$query->setOrderby('starttime');
$query->sortorder = 'ascending';
$today = date("Y-m-d");
$endDate = date('Y-m-d',strtotime($today.'+6
months'));
$query->setStartMin($today);
$query->setStartMax($endDate);
$query->setMaxResults('3');
$eventFeed =
$gdataCal->getCalendarEventFeed($query);
echo "<ul>\n";
for($i=0; $i<=2; $i++) {
$event = $eventFeed[$i];
if($event == nulll)
break;
foreach ($event->when as $when) {
$testDate = $when->startTime;
$testDate2 = split('-', $testDate);
$year = $testDate2[0];
$month = $testDate2[1];
$day = $testDate2[2];
$timestamp =
mktime(0,0,0,$month,$day,$year);
$newDate = date('F j, Y', $timestamp);
$newLink =
$event->getLink('edit')->href;
echo $newLink;
echo "<li><span class='date'>" .
$newDate ."</span><br/><i>" .
$event->title. "</i><br/><a href=".$newlink.">Read More</a></li>";
}
echo "\t</li>\n";
}
echo "</ul>\n";
?>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---