fullcalendar google integration returns a 403 error?

走远了吗. 提交于 2019-12-03 13:44:31

问题


I'm experiencing a 403 forbidden error when trying to retrieve a google public calendar feed using fullcalendar. I notice the problem also exists on fullcalendar's demo is this a change from google?

http://fullcalendar.io/js/fullcalendar-2.2.0/demos/gcal.html


回答1:


Google has deprecated and shut down Calendar API v1 and v2. The "public/full" URL is no longer available.

FullCalendar is being updated to support API v3. Once released you will be able to use a v3 style URL. First create an API key in Google Developer Console (https://console.developers.google.com). Then use the following for the URL in FullCalendar, substituting your calendar ID and API Key:

https://www.googleapis.com/calendar/v3/calendars/{YOUR_CALENDAR_ID}/events?key={YOUR_API_KEY}

The developer commented in the issue that the changes should be released tomorrow (Nov 19th). You can find more details and track the progress in this issue:

https://code.google.com/p/fullcalendar/issues/detail?id=1526&colspec=ID Type Status Milestone Summary Stars




回答2:


The problem is with the Google Calendar API JSON Output. FullCalendar converts feeds like

http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic

into

http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/full?alt=json-in-script&callback=?

in gcal.js on line 49

url: sourceOptions.url.replace(/\/basic$/, '/full') + '?alt=json-in-script&callback=?',

There does not seem to be any indication that the specs have changed. So, I assume that there is a problem somewhere in Google.

EDIT

More info here




回答3:


Adam updated the plugin to support the new Google Calendar API.
See the documentation here: http://fullcalendar.io/docs/google_calendar/



来源:https://stackoverflow.com/questions/26981661/fullcalendar-google-integration-returns-a-403-error

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