google日历api.net

google日历api.net,.net,google-calendar-api,.net,Google Calendar Api,我正在为.net使用谷歌api 2.0。我使用以下代码创建新日历: CalendarEntry calendar = new CalendarEntry(); calendar.Title.Text = "Little League Schedule"; calendar.Summary.Text = "This calendar contains the practice schedule and game times."; calendar.TimeZone = "America/Los_

我正在为.net使用谷歌api 2.0。我使用以下代码创建新日历:

CalendarEntry calendar = new CalendarEntry();
calendar.Title.Text = "Little League Schedule";
calendar.Summary.Text = "This calendar contains the practice schedule and game times.";
calendar.TimeZone =  "America/Los_Angeles";
calendar.Hidden = false;
calendar.Color = "#2952A3";
calendar.Location = new Where("", "", "Oakland");

Uri postUri = new Uri("https://www.google.com/calendar/feeds/default/owncalendars/full");
CalendarEntry createdCalendar = (CalendarEntry) service.Insert(postUri, calendar);
但是,在执行时,返回错误:

请求执行失败

排队

CalendarEntry createdCalendar=(CalendarEntry)服务.Insert(postori,calendar)

但是,如果我使用浏览器连接到google日历,则会创建新日历

另外,我使用这段代码来检索所有的日历,它是有效的

CalendarQuery query = new CalendarQuery();
query.Uri = new Uri("https://www.google.com/calendar/feeds/default/allcalendars/full");
CalendarFeed resultFeed = (CalendarFeed) service.Query(query);
有什么建议吗??
谢谢

您最好开始使用.net日历API V3,因为V2已经过时,OAuth 1.0也已经过时