Google api 由文本创建的google日历更改事件

Google api 由文本创建的google日历更改事件,google-api,google-calendar-api,google-api-php-client,Google Api,Google Calendar Api,Google Api Php Client,我正在使用google api php客户端库在我的一个日历中创建事件,其他用户也共享该事件,问题是我无法更改事件详细信息中的“创建人”字段,是否可以更改该文本?请查看我的附加屏幕截图了解更多信息 第二个问题是通知不起作用,当谷歌日历中创建的新事件未向用户发送通知时,是否有任何其他设置或我应该在api参数中更改 $objCalendar = new \Helper\GoogleCalendar(); $colorid = 8; if($item->

我正在使用google api php客户端库在我的一个日历中创建事件,其他用户也共享该事件,问题是我无法更改事件详细信息中的“创建人”字段,是否可以更改该文本?请查看我的附加屏幕截图了解更多信息

第二个问题是通知不起作用,当谷歌日历中创建的新事件未向用户发送通知时,是否有任何其他设置或我应该在api参数中更改

$objCalendar    =   new  \Helper\GoogleCalendar();
$colorid = 8;
                if($item->status == 'Pending'){
                    $colorid = 6;
                }elseif($item->status == 'Working'){
                    $colorid = 9;
                }elseif($item->status == 'Completed'){
                    $colorid = 10;
                }
                $event = array(
                            //'params'=>array('sendNotifications'=>true),
                            'sendNotifications'=>true,
                            'summary' => $item->subject,
                            'description' => $item->comment,
                            'colorId' => $colorid,
                            'start' => array(
                                'date' => $item->due_date
                            ),
                            'end' => array(
                                'date' => $item->due_date
                            ),
                            'attendees' => $admin_user_emails,
                            'reminders' => array(
                                'useDefault' => FALSE,
                                'overrides' => array(
                                    array('method' => 'email', 'minutes' => 24 * 60),
                                    array('method' => 'popup', 'minutes' => 10),
                                ),
                            ),
                        );
$objCalendar->addEvent($event);
Helper/GoogleCalendar.php

 function add_event($e){
    $calName = 'xyz@group.calendar.google.com';
    $event = new Google_Service_Calendar_Event($e);
     $optParams = array('sendNotifications' => true);
            $createdEvent = $service->events->insert($calName, $event);
            $service->events->patch($calName ,$createdEvent->getId(), $event, $optParams );
  }
  • 据我所知,当您将其插入时,它将是用户的电子邮件地址而不是他们的姓名,除非您将用户添加到您的帐户中的google people中。google无法获取用户姓名

  • 在创建活动并添加提醒后,请执行一次操作,然后我记得一次添加所有提醒时会出现问题


  • 嗨,谢谢你的回复。。你能告诉我如何设置用户的电子邮件在创建时插入功能调用?