Hello, I'm a new user to the Google API and I am trying to view my
calendar on my website using the PHP version of the API.
I have the Zend GData version 1.0.0 RC2 and am coming into a problem
with my coding. Here is what I have so far (I know, it's not much, but
it's still not working)
<code>
<?php
ini_set("display_errors","On");
// includes the Zend Framework library and loads the necessary classes
$D = DIRECTORY_SEPARATOR;
$path="d:\Zend\library";
set_include_path($path . PATH_SEPARATOR . get_include_path());
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_Calendar');
Zend_Loader::loadClass('Zend_Http_Client');
$client = new Zend_Http_Client();
$gdataCal = new Zend_Gdata_Calendar($client);
$gdataCal->setUser('myprivateusername');
$gdataCal->setVisibility('private-magiccookie');
$gdataCal->setProjection('full');
$eventFeed = $gdataCal->getCalendarFeed();
foreach ($eventFeed as $event) {
echo $event->title() . '<br />';
}
?>
</code>
Of course, "myprivateusername" and "private-magiccookie" were taken
from the XML link to my calendar.
Anyway, while trying to run the script, I come across this error:
[11-Jun-2007 12:06:15] PHP Fatal error: Uncaught exception
'Zend_Gdata_App_Exception' with message 'No such method setUser' in D:
\Zend\library\Zend\Gdata\App.php:656
Stack trace:
#0 [internal function]: Zend_Gdata_App->__call('setUser', Array)
#1 D:\it\gcal\calendar.php(13): Zend_Gdata_Calendar-
>setUser('falmouthmass.us...')
#2 {main}
thrown in D:\Zend\library\Zend\Gdata\App.php on line 656
Any suggestions on what may be wrong? Any help would be GREATLY
appreciated. Thanks!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---