Google Calendar api v3重新更新问题 [英] Google Calendar api v3 re-update issue

查看:138
本文介绍了Google Calendar api v3重新更新问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理Google日历,并且遇到将Iphone上的日历应用与Google日历之间的数据同步的问题。 (我使用google api v3)
问题是:我可以通过代码更新一个事件,只是在创建它之后的一次。下一次当我尝试更新它时,我会收到消息代码400:错误的请求。

我们可以使用谷歌日历浏览来测试这个(https://代码。 google.com/apis/explorer/#_s=calendar&_v=v3&_m=calendars.update),然后创建一个事件,然后更新它。



是否有任何一个遇到这个问题?

解决方案

我有这个相同的问题,并在这里得到了答案: Google Calendar API v3 - 更新事件



您可以编辑同一个事件两次,您只需'获取'事件序列

  $ event = $ service-> events-> get(primary ,$存在); 

$ seq = $ event ['sequence'];

并使用 $ event-> setSequence($ seq)



设置您的更新活动详情。


I'm working on google calendar and having problem with syncing data between my Calendar app on Iphone to Google Calendar. (I use google api v3) The problem is: I can update an event by code just 1 time after i created it. The next time when i try to update it, i get message code 400: bad request.

We can use google calendar explore to test this (https://code.google.com/apis/explorer/#_s=calendar&_v=v3&_m=calendars.update) by creating an event then update it 2 time.

Does any one meet this problem?

解决方案

I had this same problem and got the answer here: Google Calendar API v3 - Update Event

You can edit the same event twice, you just have to 'get' the event sequence

$event = $service->events->get("primary", $exist);

$seq=$event['sequence'];

and use $event->setSequence($seq)

when setting your update event details.

这篇关于Google Calendar api v3重新更新问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆