0
我想添加一个事件到谷歌日历使用此代码来设置作者:设置事件作者与谷歌日历API
CalendarService service = new CalendarService("TestApp");
service.setUserCredentials("[email protected]", "1234");
EventEntry entry = new EventEntry();
// Set the title and content of the entry.
entry.Title.Text = "Test";
entry.Content.Content = "Test";
// Not working
AtomPerson author = new AtomPerson(AtomPersonType.Author);
author.Name = "John Doe";
author.Email = "[email protected]";
entry.Authors.Add(author);
When eventTime = new When(activity.Start, activity.End, activity.Start == activity.End ? true : false);
entry.Times.Add(eventTime);
Uri postUri = new Uri("https://www.google.com/calendar/feeds/default/private/full");
// Send the request and receive the response:
AtomEntry insertedEntry = service.Insert(postUri, entry);
此次活动除了作者所有正确的属性添加得到。作者仍然是日历的所有者。有任何想法吗?