[我们有一个PHP应用程序,当我们使用de API在Google日历中创建事件时,会在没有环聊链接的情况下生成此事件,但是如果我们手动创建事件,则会使用环聊链接创建该事件。选中了在我们创建活动时自动创建视频群聊的选项。
代码是:
$event = new Google_Service_Calendar_Event();
$event->setSummary($summary);
$event->setLocation('hangout');
$start = new Google_Service_Calendar_EventDateTime();
$start->setDateTime($startDate->format(\DateTime::ISO8601));
$event->setStart($start);
$end = new Google_Service_Calendar_EventDateTime();
$end->setDateTime($endDate->format(\DateTime::ISO8601));
$event->setEnd($end);
$attendee1 = new Google_Service_Calendar_EventAttendee();
$attendee1->setEmail($this->masterAccount);
$attendees= [];
$attendees[] = $attendee1;
foreach($company->getUsers()->toArray() as $user){
$attendee1 = new Google_Service_Calendar_EventAttendee();
$attendee1->setEmail($user->getEmail());
$attendees[] = $attendee1;
}
$event->attendees = $attendees;
$createdEvent = $this->google_calendar_service->events->insert($company->getCalendar()->getCalendarId(), $event);
如果我们使用https://developers.google.com/google-apps/calendar/v3/reference/events/insert#try-it格式创建事件,则创建环聊链接不会出现问题。
任何解决方案?谢谢:)