HOWTO Insert Non-primary Google Calendar Event?
If you do not specify Google Calendar URI, the event will be added to the primary calendar. So, you need to figure out which URI of calendar is the right URI you want to update.
In “Calendar Settings” -> “Calendars”, Select the calendar which you want to update. You will see the link of XML. The XML link will like below :
http://www.google.com/calendar/feeds/#KEY#%40group.calendar.google.com/public/basic
#KEY# is your secret.
Replacing the “public/basic” part with “private/full“. It will become the Google Calendar URI.
http://www.google.com/calendar/feeds/#KEY#%40group.calendar.google.com/private/full
Add the URI as the second parameter in the insertEvent function. Like below :
1 2 | // $createdEntry = $gc->insertEvent($newEntry); $createdEntry = $gc->insertEvent($newEntry, "http://www.google.com/calendar/feeds/#KEY#%40group.calendar.google.com/private/full"); |