谷歌日历php API没有返回nextsynctoken

时间:2017-01-30 10:48:52

标签: php google-calendar-api google-api-php-client

我在google php calendar api中遇到了奇怪的问题。它不会返回nextsynctoken。

This is var_export of $service->events->listEvents($calendarId, $optParams);

Google_Service_Calendar_Events::__set_state(array(
   'collection_key' => 'items',
   'accessRole' => 'owner',
   'defaultRemindersType' => 'Google_Service_Calendar_EventReminder',
   'defaultRemindersDataType' => 'array',
   'description' => NULL,
   'etag' => '"p32o8lfd2qbkt20g"',
   'itemsType' => 'Google_Service_Calendar_Event',
   'itemsDataType' => 'array',
   'kind' => 'calendar#events',
   'nextPageToken' => NULL,
   'nextSyncToken' => NULL,
   'summary' => 'Meetings',
   'timeZone' => '',
   'updated' => '2017-01-30T10:18:50.782Z',
   'internal_gapi_mappings' => 
  array (
  ),
   'modelData' => 
  array (
    'defaultReminders' => 
    array (
    ),
    'items' => 
    array (
    ),
  ),
   'processed' => 
  array (
  ),
))

在api explorer中,它正在发送nextsynctoken。 Github链接: https://github.com/google/google-api-php-client/issues/1141

提前致谢。

2 个答案:

答案 0 :(得分:1)

谢谢你们,我得到了答案。她的 https://github.com/google/google-api-dotnet-client/issues/610

答案 1 :(得分:0)

同步令牌仅出现在事件的最后一页上。您需要首先使用页面令牌对所有结果进行分页,然后您将获得同步令牌:https://developers.google.com/google-apps/calendar/v3/pagination

相关问题