Am new in google calendar API,
Written below code for sending invitation using google API.
<?
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_Calendar');
$setsummary="setsummary";
$setLocation="setLocation";
$event = new Google_Event();
$event->setSummary($setsummary);
$event->setLocation($setLocation);
$start_date=date();
$start = new Google_EventDateTime();
$start->setDateTime($start_date);
$event->setStart($start);
$end_date=date();
$end = new Google_EventDateTime();
$end->setDateTime($end_date);
$event->setEnd($end);
$event->sendNotifications=true;
$attendee1 = new Google_EventAttendee();
$attendee1->setEmail('xyz@gmail.com');
$attendee2 = new Google_EventAttendee();
$attendee2->setEmail('xyzx@gmail.com');
$attendees = array($attendee1,$attendee2);
$event->attendees = $attendees;
$opt= array ("sendNotifications" => true);
$createdEvent = $cal->events->insert('********calendar id***********', $event, $opt);
?>
but unfortunately it is not sending invitation.
what I have missed in this?
I just want to simply send invitation to xyz@gmail.com
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…