【发布时间】:2011-04-29 15:01:41
【问题描述】:
我也在构建一个简单的应用程序,它需要访问我的 Google Apps 帐户中的日历。但是我遇到了身份验证问题。我已经尝试了以下代码,但它不起作用:
Service service = new Service("<appname>");
service.setUserCredentials("<email>", "<password>");
CalendarEntry entry = (CalendarEntry)service.Get("<eventUrl>");
如何让它与 Google Apps 一起使用?我必须对 Google 应用使用任何其他类型的身份验证吗?
更新:
解锁验证码解决了我获取提要的问题。现在我碰到了下一堵墙:更新事件。
entry.Title.Text = "Foo";
entry.Update();
给我 GDataRequestException 异常:“无法更新只读条目”。
我正在使用我在 kalendarsettings 下获得的私人日历 xml 地址: https://www.google.com/calendar/feeds/_%40group.calendar.google.com/private-/basic
【问题讨论】:
-
对于更新,请尝试将 /basic 提要更改为 /full,然后重新尝试更新 - 因为该代码对我有用。