Hi everyone,
I'm experimenting with google calendar api for a web backend. Problem
is code breaks at athentication. I'm using PHP and the Zend
framework. I'm not really a php developer and am not sure where to
find errors of any. Any suggestions? Here's my code, it seems to be
breaking at "/// Authenticate with Google Calendar"
<?php
// Define credentials for the Google Calendar account
define('GCAL_USER', 'xxxxxxxxxxx');
define('GCAL_PASS', 'xxxxxxxxxxxxx');
// If you need to target a specific calendar, uncomment and enter
// its calendar ID here. The calendar ID is available on the
// calendar settings page, next to the Calendar Address buttons.
//define('GCAL_ID', '[EMAIL PROTECTED]');
// Include Zend GData client library
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Calendar');
// Get Google Calendar service name (predefined service name for
calendar)
$service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
// Authenticate with Google Calendar
$client = Zend_Gdata_ClientLogin::getHttpClient(GCAL_USER, GCAL_PASS,
$service);
$service = new Zend_Gdata_Calendar($client);
try { $listFeed= $service->getCalendarListFeed();
} catch (Zend_Gdata_App_Exception $e) { echo "Error: " . $e-
>getResponse();
}
?>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---