fullcalendar not getting events from google calendar

荒凉一梦 提交于 2019-12-23 01:22:05

问题


fullcalendar is not retrieving the events from google calendar, i read something that google calendar api does not support fullcalendar anymore?.i don't know if its true.

here is my code

$(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'
  }
 })
});

UPDATE

make it work by using this code

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

回答1:


From Nov 17th 2014, google shutdown V1 and V2 of their calendar API's.For full calendar to work with Google calendar upgrade to the latest version of FullCalendar or at least replace gcal.js with this file github.com/arshaw/fullcalendar/blob/v1.x/gcal.js . In the above code, you have to include googleCalendarApiKey and googleCalendarId inside eventSources. check this link fullcalendar.io/docs1/google_calendar for documentation



来源:https://stackoverflow.com/questions/31353311/fullcalendar-not-getting-events-from-google-calendar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!