Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Calendar api v3 re-update issue

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?

like image 390
dangphatpvd Avatar asked Dec 20 '11 10:12

dangphatpvd


1 Answers

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.

like image 60
James Bowler Avatar answered Oct 03 '22 22:10

James Bowler