【问题标题】:fullcalendar not getting events from google calendarfullcalendar 没有从谷歌日历获取事件
【发布时间】:2015-07-11 04:11:47
【问题描述】:

fullcalendar 没有从 google 日历中检索事件,我读到了一些 google calendar api 不再支持 fullcalendar 的内容?我不知道它是否属实。

这是我的代码

$(function () {
 $('#calendar').fullCalendar({
 header: {
  left: 'prev,next today',
  center: 'title',
  right: 'month,agendaWeek,agendaDay'
},
buttonText: {
  today: 'today',
  month: 'month',
  week: 'week',
  day: 'day'
},
googleCalendarApiKey: 'myApi',
eventSources: {
  googleCalendarId: 'example@gmail.com'
  }
 })
});

更新

使用此代码使其工作

 eventSources: [
   { googleCalendarApiKey: 'your api key',
   googleCalendarId: 'email@gmail.com',
   className: 'fc-event-email'}];

【问题讨论】:

  • 从 2014 年 11 月 17 日起,谷歌关闭了他们的日历 API 的 V1 和 V2。要使用谷歌日历的完整日历升级到最新版本的 FullCalendar 或至少用这个文件替换 gcal.js @987654321 @ .在上面的代码中,您必须在 eventSources 中包含 googleCalendarApiKey 和 googleCalendarId。检查此链接fullcalendar.io/docs1/google_calendar 以获取文档
  • 我通过将 apikey 放入 eventsource ` eventSources: [ { googleCalendarApiKey: 'your api key', googleCalendarId: 'email@gmail.com', className: 'fc-event-email'} ,`
  • 酷,请接受我的回答。谢谢!

标签: fullcalendar google-calendar-api


【解决方案1】:

从 2014 年 11 月 17 日起,谷歌关闭了他们的日历 API 的 V1 和 V2。要使用谷歌日历的完整日历升级到最新版本的 FullCalendar 或至少用这个文件 github.com/arshaw/fullcalendar 替换 gcal.js /blob/v1.x/gcal.js 。在上面的代码中,您必须在 eventSources 中包含 googleCalendarApiKey 和 googleCalendarId。检查此链接 fullcalendar.io/docs1/google_calendar 以获取文档

【讨论】:

  • 我遇到了事件问题,可以从谷歌日历显示事件,但问题是它没有显示下个月和上个月的事件。有什么帮助吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-10-21
  • 1970-01-01
  • 2015-01-08
  • 1970-01-01
相关资源
最近更新 更多