我正在使用php watch命令:
$service = new Google_Service_Calendar($client); $channel = new Google_Service_Calendar_Channel($client); $channel->setId('20fdedbf0-a845-11e3-1515e2-0800200c9a6689111'); $channel->setType('web_hook'); $channel->setAddress('https://www.exampel.com/app/notification'); $watchEvent = $service->events->watch('primary', $channel);
这个命令工作正常,我得到响应:
Google_Service_Calendar_Channel Object ( [address] => [expiration] => 1401960485000 [id] => 20fdedbf0-a845-11e3-1515e2-0800200c9a6689111 [kind] => api#channel [params] => [payload] => [resourceId] => HZjSdbhwcd5KMKEA3ATA31LoR-w [resourceUri] => https://www.googleapis.com/calendar/v3/calendars/primary/events?key=AIzaSyBl_Y7Y4eQDve-0DjwzBEP7_qOLo-67ouY&alt=json [token] => [type] => [modelData:protected] => Array ( ) [processed:protected] => Array ( ) )
然而; 在我的设置网址中,当日历中发生某些更改时,我没有收到任何消息。我错过了什么吗?