【问题标题】:Google Calendar API on Objective C Issue关于 Objective C 问题的 Google Calendar API
【发布时间】:2014-06-28 05:42:59
【问题描述】:

我一直在使用 Xcode(iOS 开发)上的 google calendar API,到目前为止,我已经能够将我的 xcode 项目链接到我的 google 帐户,并且基于本教程: http://code.tutsplus.com/tutorials/ios-sdk-working-with-google-calendars--mobile-19155

我终于可以在我的日历中发布快速添加事件了。但是,我在发布特定时间的活动时遇到问题。

我根据以下内容构建我的事件字符串: https://support.google.com/calendar/answer/36604?hl=en

_strEventTextToPost = [NSString stringWithFormat:@"%@ %d/%d/%d at %d:%d", _strEvent, [dateComponents day], [dateComponents month], [dateComponents year], [dateComponents hour] , [dateComponents 分钟]];

并使用 googleOauth 类发布它

[_googleOAuth callAPI:apiURLString withHttpMethod:httpMethod_POST postParameterNames:[NSArray arrayWithObjects:@"calendarId", @"text", nil] postParameterValues:[NSArray arrayWithObjects:[_dictCurrentCalendar objectForKey:@"id"], _strEventTextToPost, nil]]; NSLog(@"%@",[NSArray arrayWithObjects:[_dictCurrentCalendar objectForKey:@"id"], _strEventTextToPost, nil]);

当我运行应用程序时,事件会发布在日历中,但作为全天事件,我尝试更改字符串顺序,但始终显示没有小时/分钟。

任何补充信息请在下方评论,谢谢!我现在很困!

【问题讨论】:

    标签: objective-c google-api google-calendar-api


    【解决方案1】:

    我刚刚尝试“在 2014 年 5 月 24 日 13:30”,它起作用了,所以尝试在日期之前添加“on”。

    您可以在此处的“试用”部分中使用它:

    https://developers.google.com/google-apps/calendar/v3/reference/events/quickAdd

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-19
      • 1970-01-01
      相关资源
      最近更新 更多