【问题标题】:google calendar api .net谷歌日历 api .net
【发布时间】:2013-12-29 09:41:28
【问题描述】:

我正在为 .net 使用 google 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) service.Insert(postUri, calendar);

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

另外,我使用此代码来检索所有日历,它的工作原理

CalendarQuery query = new CalendarQuery();
query.Uri = new Uri("https://www.google.com/calendar/feeds/default/allcalendars/full");
CalendarFeed resultFeed = (CalendarFeed) service.Query(query);

有什么建议吗?? 谢谢

【问题讨论】:

    标签: .net google-calendar-api


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-04-15
      • 1970-01-01
      • 1970-01-01
      • 2016-01-03
      • 2017-08-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多