我使用此代码获取日历列表,但我收到此错误(.NET)
我在谷歌搜索了很多,但没有用
我如何获得获取日历列表的解决方案 params是DataType OAuth2Parameters
GOAuth2RequestFactory rf = new GOAuth2RequestFactory("GoogleIntegration", applicationName, param);
CalendarService cs = new CalendarService(applicationName);
cs.RequestFactory = rf;
CalendarQuery fq = new CalendarQuery();
fq.Uri = new Uri("http://www.google.com/calendar/feeds/default");
CalendarFeed cf = cs.Query(fq);
ds = new DataSet();
dt = new DataTable();
dc = new DataColumn();
dc.DataType = Type.GetType("System.String");
dc.ColumnName = "CalendarName";
dt.Columns.Add(dc);
foreach (CalendarEntry ce in cf.Entries)
{
DataRow dr = dt.NewRow();
dr["CalendarName"] = ce.Title;
dt.Rows.Add(dr);
}
ds.Tables.Add(dt);
gridcalendars.DataSource = ds;
gridcalendars.DataBind();