2

I have been struggling with the php api for Google Calendar for weeks now. I have already managed to add and read events with the api and now I'm trying to get Extended Properies to work. I have tried two different ways of adding them to my events:
1:

$extProp = New Google_EventExtendedProperties('test', 'test');
$event->setExtendedProperty($extProps);

2:

$extProp = New Google_EventExtendedProperties('test', 'test');
$event->ExtendedProperty = $extProps;

Both don't give me errors, but I'm not sure if it's working. I tried to read the events with the get method as well as with the list method wich are both described in the documentation of the api, but I can't get my extended properties.

Does anyone know how extended properties work with php?

4

2 回答 2

3

我终于设法做到了。我使用了以下代码:

$extendedProperties = New Google_EventExtendedProperties();
$extendedProperties->setShared(array('custom'=>'blalblabla'));
$event->setExtendedProperties($extendedProperties); 
于 2013-11-21T09:39:51.543 回答
0

$extendedProperties = 新的 Google_EventExtendedProperties();

应改为:

$extendedProperties = new Google_Service_Calendar_EventExtendedProperties();
于 2015-05-28T11:30:12.343 回答