php - 使用 Codeigniter 将完整日历中的数据发布到 Google 日历
问题描述
我正在使用构建应用程序codeigniter
,现在我被困在一个地方。我已将其集成full calendar
到运行良好的应用程序中。现在我需要像某人那样做一个insert an event on full calendar using my application
事件automatically insert that event on google calendar also using google calendar API
。我已经通过作曲家安装了谷歌客户端 api,但这也无济于事。我通过从谷歌日历为开发人员获取一个想法来制作一个功能,但它也给了我一个错误。请检查问题,我很感激任何帮助
这是我的控制器上的一个功能:
function google_event(){
$event = new Google_Service_Calendar_Event(array(
'summary' => 'Google I/O 2015',
'location' => '800 Howard St., San Francisco, CA 94103',
'description' => 'A chance to hear more about Google\'s developer products.',
'start' => array(
'dateTime' => '2021-09-28T09:00:00-07:00',
'timeZone' => 'America/Los_Angeles',
),
'end' => array(
'dateTime' => '2021-09-28T17:00:00-07:00',
'timeZone' => 'America/Los_Angeles',
),
'recurrence' => array(
'RRULE:FREQ=DAILY;COUNT=2'
),
'attendees' => array(
array('email' => 'lpage@example.com'),
array('email' => 'sbrin@example.com'),
),
'reminders' => array(
'useDefault' => FALSE,
'overrides' => array(
array('method' => 'email', 'minutes' => 24 * 60),
array('method' => 'popup', 'minutes' => 10),
),
),
));
$calendarId = 'cicuser3@gmail.com';
$event = $service->events->insert($calendarId, $event);
printf('Event created: %s\n', $event->htmlLink);
}
解决方案
推荐阅读
- c++ - 超类是否需要默认构造函数?
- matplotlib - 如何在垂直图上使用 pyplot fill_between?
- excel - Change any weekend dates that appear in a specific cell to the Friday beforehand
- javascript - 在哪里可以找到要添加到 babel.config.js 的 polyfill 名称
- php - Relationships with Laravel
- r - 多面冲积图中的变量对齐 ggrepel 文本标签
- server - When and how should DAPI and SAPI be used?
- tsql - 如何通过名称获取元素的值
- arrays - 从字符串数组填充对象的属性
- git - Jenkins 工作区位置