Fullcalendar: can it work with Google Calendars set to private?

随声附和 提交于 2019-12-09 22:44:13

问题


I’m working in a project in which I need to use the Google Calendar (or similar) to provide the calendar functionality. However, every time a task is added to the calendar I need it to be added to my own database too. Also, I may want to sort which data goes to each place. For example, I’m scheduling an activity for a certain day and time and with a certain title and description and this last parameter is stored only in my DB, whilst the other 3 are stored both in the Google Calendar back-end (as it normally happens) and in my database.

I browsed the internet for a solution and found this answer - http://www.google.com/support/forum/p/apps-apis/thread?tid=1a58d12f0b69d9b0&hl=en - which led me to Fullcalendar.

But now when I open Fullcalendar's documentation I read that step 1 is to make the calendar public... Is there really no way to work with a private calendar? Because if you imagine that one may want to store some events' data in a DB other that Google DB, it could well be for confidentiality reasons.


回答1:


It is possible to use Google as your backend for the calendar - see my question and answer: Secure shared Google Calendar. If you are not using the Zend framework, it won't be of direct help, but it will show that it is possible to get the data from a secure calendar using Googles GData API, you will just have to do a bit more work to do what Zend have already done. You can also store extra information on the Google Calendar DB (using the API) which isn't shown on any of the Google GUI thus meaning you don't need to use two datastores like you suggest. However if you did still want to pursue using Google and your DB, you could use the API, create an event on the Google calendar, store the ID it returns when the event is created, then in your DB add whatever extras you want along with Googles ID. Then in your code where you create the feed for the calendar (similar to the link above) just add a query to check your DB for the ID of the event which Google just returned.




回答2:


I know this thread is old, but here's a plunk that does what you're asking.



来源:https://stackoverflow.com/questions/4398055/fullcalendar-can-it-work-with-google-calendars-set-to-private

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