My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1526: Broken Google Calendar Integration - migrate to API v3
26 people starred this issue and may be notified of changes. Back to list
Status:  Released
Owner:  ----
Closed:  Nov 2014


Sign in to add a comment
 
Reported by savit...@umich.edu, Sep 5, 2012
FullCalendar seems to support Google Calendar API v2, which is being depreciated. Please add support to Google Calendar Api version-3, which uses json feed, as against gdata feeds (private xml feeds), thats supported by full calendar.

Sep 25, 2012
#1 joh...@umich.edu
I agree. Support for Google Calendar Api version-3 is required for Full Calendar to be any use for our institution.
Aug 15, 2013
Project Member #2 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Discussing
Labels: Type-Feature
Aug 28, 2014
#3 ami.bh...@askmybraintrust.com
Same, our company is actively upgrading from Calendar v2 to v3 and could use FullCalendar's support. 
Oct 30, 2014
Project Member #4 adamrs...@gmail.com
 Issue 2332  has been merged into this issue.
Oct 30, 2014
Project Member #5 adamrs...@gmail.com
sample implementation in  issue 2332  (thx gwbach)
Nov 17, 2014
#6 pderk...@gmail.com
GCal API v2 now officially deprecated as Google warned.

See the results and console errors here:
http://fullcalendar.io/js/fullcalendar-2.2.0/demos/gcal.html

Nov 17, 2014
#7 fontana....@gmail.com
There will be any fix for this situation ?
Nov 17, 2014
#8 EpicSoft...@gmail.com
I'm having issues with this aswell. I'm already working on a PHP script to tunnel the V3 to Fullcalendar.
Nov 17, 2014
#9 fontana....@gmail.com
Awesome!
Nov 17, 2014
#10 jo...@parkingpanda.com
I forked and updated the gcal code to work with v3. I updated gcal.js and demos/gcal.html. You can get them here: https://github.com/jonnyhweiss/fullcalendar

The big change here is that calls to the calendar API require an API key. You need to create a project in the Google Developers Console (https://console.developers.google.com), enable the Calendar API, set up an access key for browser apps in the Credentials setting, and then append ?key={APIKEY} to your URL. I put a sample api key in gcal.html

I hope this helps! I submitted a pull request so hopefully it will be fixed in the main branch soon.
Nov 17, 2014
Project Member #11 adamrs...@gmail.com
 Issue 2355  has been merged into this issue.
Nov 17, 2014
Project Member #12 adamrs...@gmail.com
 Issue 2358  has been merged into this issue.
Nov 17, 2014
Project Member #13 adamrs...@gmail.com
 Issue 2356  has been merged into this issue.
Nov 17, 2014
Project Member #14 adamrs...@gmail.com
 Issue 2357  has been merged into this issue.
Nov 17, 2014
Project Member #15 adamrs...@gmail.com
will get the fix for this into a release tomorrow
Summary: Broken Google Calendar Integration - migrate to API v3 (was: Add support for Google Calendar API v3)
Status: Accepted
Labels: -Type-Feature Type-Bug
Nov 18, 2014
#16 mike.yra...@gmail.com
Shouldn't the public shared URL still work? Or does Google expect every non-technical user to have an API key to share Calendars?
Nov 18, 2014
#17 theonlyg...@gmail.com
Non-technical users are not using the API calls but the Google Calendar web page.
Nov 18, 2014
#20 skrpc.sc...@gmail.com
I thought the same regarding the public url, in the v2 API the public URL had different levels denoted by the last parameter of the url which when looking at the calendar settings in Google Calendar sets it to "Basic".  This does indeed still work but only returns a subset of the information and that does not include the start and end date and time so cannot be added as events in FullCalendar.  Therefore the FullCalendar Google support code (gcal.js)  would switch the type to "Full" before fetching which returns much more information and it is this full mode that has been disabled returning an html error 403 (Forbidden).
Nov 18, 2014
#22 bran...@localcounselcollective.com
Google changed some of the URL parameters too.

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

The start time & end time & timezone are wrong for example.
Nov 18, 2014
#23 fabrizio...@gmail.com
Do you have to enable billing in order to have your key working?
Nov 18, 2014
#24 eleco...@gmail.com
No ! of course

no money
Nov 18, 2014
#25 theonlyg...@gmail.com
jonny's solution doesn't handle cancelled / deleted events and will crash if you have some. Just a heads up to check for that.
Nov 18, 2014
#26 eleco...@gmail.com
So.. wait the official solution ;-)
Nov 18, 2014
#27 jo...@parkingpanda.com
Yeah sorry about that -- I was using Google's holiday calendar and that's all I tested with. The code for it in gcal.js is pretty simple -- it should be pretty easy to edit it to make it work for cancelled / deleted events. There will be an official solution soon, though, so if it's not time sensitive waiting is not a bad idea
Nov 18, 2014
#28 rich...@ampersandstudio.uk
I adapted the code earlier but haven't got access to it now. As a guide though the following may help:

Check event.status = confirmed
Remove startParam and endParam
Add options for timeMin and timeMax
Use start and end arguments and convert to yyyy-mm-ddT00:00:00Z format and add to timeMin and timeMax

This got round the deleted/cancelled events issue and collects only the relevant events.
Nov 18, 2014
#29 chancege...@gmail.com
So is there going to be a fix for using the public url for full. Example: http://www.google.com/calendar/feeds/jcgn9ic0he5a4rand8ejk7bm2s@group.calendar.google.com/public/full
Nov 18, 2014
#30 fabrizio...@gmail.com
Activated a project, created a key for browser.... still doesn't work...
Nov 18, 2014
#31 fabrizio...@gmail.com
it remains stucked with a never-ending "loading" string....

Nov 18, 2014
#32 skrpc.sc...@gmail.com
See merged  issue 2358  (about 10 items down with a line through it).  This has a replacement for the function in gcal.js that does the work and that supports start and end and also still uses the original url format and the one that is shown when selecting the XML option from the calendar settings page for backward compatibility.  It does not check for deleted or cancelled events but if this check is required I am sure you can easily add it.

This is a quick and dirty fix but should be enough to get sites up and running again until the official fix is released.  You do need a Google Key but keys are easy to obtain and are still free, I hard coded my single key in for all customers as the keys are restricted to 500,000 requests per day which is more than enough requests for all the users of my software.
Nov 18, 2014
#34 rich...@ampersandstudio.uk
Here is my quick fix based on jo...@parkingpanda.com's suggestion. I've just adapted this function as follows:

function transformOptions(sourceOptions, start, end, timezone) {

	var success = sourceOptions.success;
	var d_s = new Date(start);
	var d_e = new Date(end);
	var data = $.extend({}, sourceOptions.data || {}, {
		singleevents: true,
		'max-results': 9999,
		'timeMin': d_s.getFullYear()+'-'+(d_s.getMonth()+1)+'-'+(d_s.getDate())+'T00:00:00Z',
		'timeMax': d_e.getFullYear()+'-'+(d_e.getMonth()+1)+'-'+(d_e.getDate())+'T23:59:59Z',
	});
	
	return $.extend({}, sourceOptions, {
		url: sourceOptions.url + '&callback=?',
		dataType: 'jsonp',
		data: data,
		success: function(data) {
			var events = [];
			if (data.items) {
				$.each(data.items, function(i, entry) {
					if (entry.status == "confirmed") {
						events.push({
							id: entry.id,
							title: entry.summary,
							start: entry.start.dateTime || entry.start.date,
							end: entry.end.dateTime || entry.end.date,
							url: entry.htmlLink,
							location: entry.location,
							description: entry.description
						});
					}
				});
			}
			var args = [events].concat(Array.prototype.slice.call(arguments, 1));
			var res = applyAll(success, this, args);
			if ($.isArray(res)) {
				return res;
			}
			return events;
		}
	});
	
}

Richard
Nov 18, 2014
#35 cuz...@gmail.com
rich...@ampersandstudio.uk changes worked great, but one of my calendars has a repeating event that is not showing up.
Nov 18, 2014
#36 chancege...@gmail.com
Can someone answer my question? 
Is there going to be a fix for using the public url for full. Example: http://www.google.com/calendar/feeds/jcgn9ic0he5a4rand8ejk7bm2s@group.calendar.google.com/public/full
Or am I going to have to change to using their API?
Nov 18, 2014
#37 cuz...@gmail.com
The v2 API that your link uses is deprecated. This means it will no longer function. You will need to use the new method of retrieving data from the calendar API.
Nov 18, 2014
#38 cuz...@gmail.com
Figured it out. The line on #34 "singleevents: true" should be "singleEvents: true"
Nov 18, 2014
#39 chancege...@gmail.com
So there is no way to just get the calendar info without the new API? Meaning for anyone to even see the calendar they have to be authorized? There has to be an easy way to just pull the info if the calendar is public without authorization.
Nov 18, 2014
#40 d...@fifthcircle.be
'max-results' should also be 'maxResults' and I think there is a limit of 2500. So it should be:
'maxResults':2500
Nov 18, 2014
#41 skrpc.sc...@gmail.com
I guess it is technically possible at the moment to use the original URL replacing full for basic and then breaking down the string based information into the constituent parts butt even doing this there is nothing to say that Google will not deprecate the call using the "Basic" mode at some point in the future as it is technically still v2 API which is deprecated.

There should be no problem obtaining a key, it is really only the developer of the site and therefore the company/person implementing FullCalendar that needs an API key and this key can then be used as a parameter (or hardcoded depending on how the fix goes) in the code that is implementing FullCalendar; the key is good for 500,000 requests (not events but individual requests) per day so one key will typically meet the needs of most sites even if used by multiple customers.

The problem with the fix above is that the line "url: sourceOptions.url + '&callback=?'" means that the source url in the FullCalendar options must be the google v3 API format and must also include the API key meaning that the source url is no longer the XML link displayed in the google calendar settings page.  By changing this line in the above code to "url: sourceOptions.url.replace(/www.google.com\/calendar\/feeds\//, 'www.googleapis.com/calendar/v3/calendars/').replace(/public\/basic$/, 'events?key=<Your Google API Key>')" means you can still use the URL as displayed by Google (and the one that all sites will be currently coded to use) and just replace the <Your Google API Key> to the one key you as a developer have obtained; I would suspect in the official fix they would do something similar but instead of having to edit gcal.js yourself they will be adding a parameter for the Google API Key.
Nov 18, 2014
#42 d...@fifthcircle.be
chancege...@gmail.com: you can still use your calendar. You only need to authorize the api call, by adding a key to the url. Your site visitors won't even know. Just follow instructions above. I've got a working example on this site: http://www.turnhouttigers.be/kalender/
Nov 18, 2014
#43 ChgoandB...@gmail.com
Thank you. I have resolved my issue.

Nov 18, 2014
#44 mike.yra...@gmail.com
The old URL style is what Google is still using when obtaining a public xml URL? Where does the user get this new v3 style of URL for the calendar feed?
Nov 18, 2014
#45 skrpc.sc...@gmail.com
By making the change url field to the code listed in #34 with the comments in #41 the current URL from Google will still work.  This is what I did in my code and no customer sites had to change, my system allows my users to add their own calendars and the URL from Google is stored in the database so I needed it to be backward compatible with what my customers were already used to.
Nov 19, 2014
#46 rich...@ampersandstudio.uk
@ cuz...@gmail.com
@ d...@fifthcircle.be

Thanks for updates, both implemented on my sites too now.
Nov 19, 2014
#47 nampar...@gmail.com
The above code and using:

"url: sourceOptions.url.replace(/www.google.com\/calendar\/feeds\//, 'www.googleapis.com/calendar/v3/calendars/').replace(/public\/basic$/, 'events?key=<Your Google API Key>')"

Works perfectly BTW on the code above.

We use a wordpress plugin which we have updated to take into account all the above and is now working again like a dream with 3 calendars displayed on one.

Perfect. I'm sure a more robust solution will develop but this is a good work around to get sites running again in the short term.
Nov 19, 2014
Project Member #48 adamrs...@gmail.com
Version 2.2.1 has been released with the official fix. You don't need to fully upgrade if you don't want to. You just need to replace gcal.js with the latest (will work down to 2.0.0). Also, a `googleCalendarApi` parameter is now required. You can still continue to use your old feed URLs (built to recognize and be smart about that), but it is recommended to use `googleCalendarId` going forward. For more on fixes related to v2.x, see here: http://fullcalendar.io/docs/google_calendar/

Version 1.6.5 has been released, a backport of the fix. Again, you don't need to fully upgrade if you don't want to. You just need to replace gcal.js. Version 1.6.5's gcal.js will work all the way down to v1.5.0 (released in 2011). However, the way you define your event source is very different!!! It requires an object with `googleCalendarApi` and `googleCalendarId`. The API key *must* go in the Event Source object, *not* in the top-level options like v2 allows. For more info and examples see: http://fullcalendar.io/docs1/google_calendar/

https://github.com/arshaw/fullcalendar/releases
Status: Released
Nov 19, 2014
Project Member #49 adamrs...@gmail.com
 Issue 2362  has been merged into this issue.
Nov 19, 2014
#50 mike.yra...@gmail.com
Adam,

Great job getting the fix in place so quickly. Thank you.
Nov 19, 2014
#51 smellyde...@gmail.com
Thanks for the quick fix!

Does anyone know how to add multiple sources in version 2.2.1?
Nov 19, 2014
#53 nampar...@gmail.com
Multiple sources works great like this: (don't need the document ready stuff unless you are using it...)

$(document).ready(function() {	
    $('#your_id').fullCalendar({
		googleCalendarApiKey: '<API KEY>',
		eventClick: function(calEvent, jsEvent, view) {
			// Turn off event click if needed...
			//alert('Event: ' + calEvent.title);
			//alert('url: ' + calEvent.url);
			//alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
			//alert('View: ' + view.name);
			//window.location.href = "https://google.com";
			return false;
		},
		header: {
		left: 'prev,next today',
		center: 'title',
		right: 'month,agendaWeek,agendaDay',
		},
    	eventSources: [
			{googleCalendarId: '<Google Cal ID1>', color: '#4986E7',}, // Cal 1
			{googleCalendarId: '<Google Cal ID2>', color: '#7BD148',}, // Cal 2
			{googleCalendarId: '<Google Cal ID3>', color: '#D06B64',}  // Cal 3
        ],        
        events:
			{className: 'gcal-event'}, // an option!
		timeFormat: 'LT'
    });
    $('#your_id').fullCalendar('today');
});
Nov 19, 2014
#54 raselahm...@gmail.com
Great job. 
Nov 19, 2014
#55 Roebling...@gmail.com
I have tried and can't get mine to work.  What am I doing wrong?

http://www.roeblingroad.com/roebling.html

My old page is here: http://www.roeblingroad.com/schedule.html

Any help would be appreciated.
Nov 19, 2014
#56 kmaur...@gmail.com
Adam,

In the new 2.2.1 of the gcal.js, in the transformOptions function, I believe the following line needs to use encodeURIComponent() instead of encodeURI().

var url = API_BASE + '/' + encodeURI(sourceOptions.googleCalendarId) + '/events?callback=?'; // jsonp

encodeURI() leaves # and @ signs in the googleCalendarId. For example, if you are using this Calendar ID: en.usa#holiday@group.v.calendar.google.com
Nov 19, 2014
#57 lalapott...@gmail.com
If I have many individual calendars all calling up the same gcal.js, do I now need multiple API keys, one for each calendar?

Previously, I could enter the feed right on the calendar HTML page and get the correct output - now it looks as though I need to specify in the gcal.js each feed and API?
Nov 19, 2014
#58 djwav...@gmail.com
Thanks for the legwork here.

Downloaded and tested fullcalendar v 2.2.1. Applied own API key and test shows full link in GET request to fetch hollidays. Then applied own calendar as events source and the shows broken. 
No "events?callback" in the url. No results shown.

Had results after Richards fix, from which I conclude that the API is set up right. 



Nov 19, 2014
#59 jepst...@alz.org
I got an API key, implemented the new gcal.js, did everything. I am failing on gcal.js Line 60: Cannot read property of 'googleCalendarApiKey' of undefined.

Here's my code - am I doing something wrong?
=======================================================================
var goGetCal = function() {
					$("#calcontainer").addClass("activepanel").show();
					$("#calendarnav").addClass("activenav");	
					$('#calendar').show();
					$('#calendar').fullCalendar({
					   googleCalendarApiKey: '<AIzaSyCiByvx_H_9OG_cJVLG6BX4IoMltwSufaw>',
						aspectRatio: 99,
						theme: true,
						backgroundColor: '#C9EFF5',
						header: {
							left: 'prev,next today',
							center: 'title',
							right: 'month'
							},
						editable: true,
						eventSources: [
						{
							//'community partnership events'
							googleCalendarId: 'alz.org_4kmsjt5amn14ttf8tg96cesg3o@group.calendar.google.com',
							backgroundColor: '#DCEEF2',
							textColor: '#000'
									
						},{
							//'early stage events'
							googleCalendarId: 'alz.org_hjqu8o7pckn0d5351n19c3bt9s@group.calendar.google.com',
							backgroundColor: 'rgb(231,216,172)',
							textColor: '#000',
							className: 'fc-event-inside'					//var to label self events we can register
							}
						],	
Nov 19, 2014
#60 rich...@ampersandstudio.uk
Your API Key shouldn't have the < and > at the start and end.
Nov 19, 2014
#61 jepst...@alz.org
Thanks, cleared that but that wasn't it.

Nov 19, 2014
#62 jepst...@alz.org
Turns out I am on FC v.1.6.4 ; that's probably it.
Nov 19, 2014
#63 tomade...@gmail.com
Our school LOVES FullCalendar to stay on top of our crazy daily schedule, THANK YOU to everyone involved in helping us transition to v3 of the API.

It seems to work great when I add a calendar from a personal Google account or use a public Google Calendar (like the holiday one in the demo), but it *won't* work when I try using a calendar from my organization's Google Apps for Education account.

To my eye, the difference is in the prefix xxxx.xxx_ at the start of the CalendarID.
Nov 19, 2014
#64 nampar...@gmail.com
what errors are you getting now...?
Nov 19, 2014
#65 Roebling...@gmail.com
Can someone share their page with it working from a personal google account so I can review the code?

Here is mine which isn't working:
<script>

	$(document).ready(function() {
	
		$('#calendar').fullCalendar({

			//API
			googleCalendarApiKey: 'AIzaSyBa__ZAmvOgcbP1m9sRvgfBGwWchcSBv7Y',
		
			// Roebling
			events: 'roeblingrr@gmail.com',
			
			eventClick: function(event) {
				// opens events in a popup window
				window.open(event.url, 'gcalevent', 'width=700,height=600');
				return false;
			},
			
			loading: function(bool) {
				$('#loading').toggle(bool);
			}
			
		});
		
	});

Nov 19, 2014
#66 tom_gro...@watkinson.org
Sorry, I should've been more specific in my original post! No errors, just a blank calendar when I use our org's ID, and when I swap out ID's with a personal shared calendar, everything looks good/as expected.
Nov 19, 2014
#69 nampar...@gmail.com
Sure...

It's in a page via a plugin in wordpress - but all the code is there. 

Works really well - http://holwelldartmoor.co.uk/availability-calendar/

Also just checking - you did make your cals public right?


<script type='text/javascript'>

jQuery(document).ready(function($) {
    // $() will work as an alias for jQuery() inside of this function

$(document).ready(function() {	
    $('#1').fullCalendar({
		googleCalendarApiKey: 'AIzaSyAk1VQjjYqHHS-5CnB6kESFVSq2mPoQfL8',
		eventClick: function(calEvent, jsEvent, view) {
			/* alert('Event: ' + calEvent.title);
			alert('url: ' + calEvent.url);
			alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
			alert('View: ' + view.name); */
			window.location.href = "https://google.com";
			return false;
		},
		header: {
		left: 'prev,next today',
		center: 'title',
		right: 'month,agendaWeek,agendaDay',
		},
		firstDay: 5,
    	eventSources: [
			{googleCalendarId: 'ffr4oo2eijlafu8q377ccrhvj0@group.calendar.google.com', color: '#4986E7',}, // Chinkwell
			{googleCalendarId: 'ivc0c27l1qs50jna341gk30cs4@group.calendar.google.com', color: '#7BD148',}, // Hound
			{googleCalendarId: '8b7hm3q6ofn295ph1j212ubis8@group.calendar.google.com', color: '#D06B64',} // Saddle
        ],        
        events:
			{className: 'gcal-event'}, // an option!
		timeFormat: 'LT'
    });
    $('#1').fullCalendar('today');
});
});
</script>
Nov 19, 2014
Project Member #70 adamrs...@gmail.com
I haven't investigated everyone's individual problems, but its been made clear to me that things won't work when your calendar ID has periods before the @ sign, and the calendar is specified as a plain string. So, if your calendar is specified like this:

    events: 'p11454b4nk55j1l7.acnjqqsh3frp82se@import.calendar.google.com'

It won't work. Specify it like this to fix:

    events: { googleCalendarId: 'p11454b4nk55j1l7.acnjqqsh3frp82se@import.calendar.google.com' }

Coming up with a patch release to address this and a few other minor glitches.
Status: Accepted
Nov 19, 2014
#71 jepst...@alz.org
I hope this is useful: gcal.js Line 75 

Google Calendar API: Not Found Object {domain: "global", reason: "notFound", message: "Not Found"} 

// print error to debug console
if (consoleWarnFunc) {
>>>>>	consoleWarnFunc.apply(consoleObj, [ message ].concat(apiErrorObjs || []));
		}
Nov 19, 2014
Project Member #72 adamrs...@gmail.com
I release v2.2.2/v1.6.6 with the latest fixes
- Lone-string Google Calendar ID's with periods before the @ should work (thx @tomadelic)
- Switched to encodeURIComponent (thx @kmaurino)
- removeEventSource was a little bit broken w/ Google Calendar IDs. fixed

@jepstein@alz.org, that error you're getting means the Google API can't return feed data either because your Calendar ID is invalid or the API is not configured properly on your end. Make sure to follow the instructions here:

http://fullcalendar.io/docs/google_calendar/
Status: Released
Nov 19, 2014
#73 webmas...@ftdi.com
If we are using this in a corporate environment could firewalls or anything else be blocking the calendar feed?    My calendar is showing but the data is not there?

Nov 19, 2014
#74 polybo...@googlemail.com
@jepst...@alz.org: 
You have to define googleCalendarApiKey in eventSources like this:
	eventSources: [
	{
		//'community partnership events'
		googleCalendarId: 'alz.org_4kmsjt5amn14ttf8tg96cesg3o@group.calendar.google.com',
		googleCalendarApiKey: 'AIzaSyAk1VQjjYqHHS-5CnB6kESFVSq2mPoQfL8',
		backgroundColor: '#DCEEF2',
		textColor: '#000'
	},{
Nov 19, 2014
#75 webmas...@ftdi.com
My googleCalendarId is my email address??  It doesn't look like the rest shown (ie abcd1234@group.calendar.google.com)
Nov 19, 2014
#78 djwav...@gmail.com
As much as I want to open the bottle of champagne, I am yet not able to get my own calendar in sight.

Testing FullCalendar v2.2.2

Raw test shows holidays (good)
Following steps as described on the FullCalendar site, which confirm my own process.

Apply my own calendar ID (for main one is the gmail email address)
Apply Google API key

Run test: events are not shown

Shown query link: http://playground/fullcalendar-2.2.2/demos/myemail@gmail.com?start=2014-10-26&end=2014-12-07&_=1416435600398

This query link seems to be broken/incomplete compared to the query for the holiday calendar. 



Nov 19, 2014
#79 djwav...@gmail.com
Additional info to #78

Applied following string to replace in events:
events: { googleCalendarId: 'myemail@gmail.com' }


Events show. Gazing at the cork for champagne ..  ;-)
Nov 19, 2014
Project Member #80 adamrs...@gmail.com
Glad you figured out the issue @djwave28.

Gaaa, I didn't account for straight-up gmail addresses as calendar ID's. In future versions I'll account for this. In the meantime, like you've discovered, it is recommended to explicitly use a `googleCalendarId`. That way there is no ambiguity. I updated the docs to reflect.
Nov 19, 2014
#81 webmas...@ftdi.com
I have followed the instructions but calendar is still not showing any events?  Is there a step-by-step somewhere that INCLUDES the code for the web page the calendar resides on?  Showing the .js includes and all the scripting code?

Nov 19, 2014
#83 Roebling...@gmail.com
Thanks for your hard work on this!  I am back in business and very happy!  
Nov 20, 2014
#84 da.arvid...@gmail.com
Hi!

I have always been using Fullcalendar with my private address to my different Google Calendars and this has worked without making my calendars public.
Now when Google removed the old API my private address no longer work and I have tried to create a API key and use the calendarID but it's not working.

Do you know if this only work IF I make the calendar public or is it some way that I can get this to work with a private calendar?
Nov 20, 2014
#86 webmas...@ftdi.com
I have followed the instructions step by step and my calendar has no calendar info?  I cannot figure out what I am doing wrong.  I am not a complete novice at this stuff so I am scratching my head as to why this is not working?  
Nov 20, 2014
#87 danwhit...@gmail.com
The removeEventSource still isn't functioning. See http://screencast.com/t/90ryhxv9z81o.

 
Nov 20, 2014
#88 jepst...@alz.org
@webmas...@ftdi.com  You may be in a similar situation to me, where a HQ office is the actual domain admin for the underlying calendars. I suspect a rights issue somewhere and am trying to hunt it down in my or as well as Google.
Nov 20, 2014
#89 webmas...@ftdi.com
@jepst...@alz.org  Like a firewall blocking the API connection?    I am the admin for this calendar and have full access to the settings.
Nov 20, 2014
#90 danwhit...@gmail.com
In regard to removeEventSource not working, adjusting the getSourcePrimitive function to include a check for "|| source.googleCalendarId" fixes it. However, this obviously wouldn't be good for backwards compatibility.

The issue appears to be that the eventSources using googleCalendarId do not have a url property, which is what getSourcePrimitive checks for a comparison.

Would adding the url property to the event source in gcal.js cause issues?
Nov 20, 2014
#91 danwhit...@gmail.com
Nevermind about the removeEventSource. I finally realized that I could pass in just the googleCalendarId to get the remove to work. It doesn't accept the entire object as before, but at least it's working :).
Nov 20, 2014
#92 parkdale...@gmail.com
Hello,

I have been trying to update to V2 using the Google API and I am having trouble with displaying anything on the Calendar.

I am attempting to add two calendars with two API Keys and although the calendar seems to load, I am not seeing anything!

I am still using the old CSS file from V1 and jquery 1.9.1 on my site, but I tried to test the script using the fullCalendar gcal demo html file and it still doesn't work.

You can see what I am working on here:

http://www.emsb.qc.ca/parkdale/calendar.asp

Also, if anyone can let me know how the googleCalendarError callback works maybe I can figure out what is happening!


  
Nov 20, 2014
Project Member #93 adamrs...@gmail.com
@danwhite85, I've created a separate issue for your problem with removeEventSource. Thanks
https://code.google.com/p/fullcalendar/issues/detail?id=2368

For everyone who is having problems with their Google Calendars, please use your debugging tools. In the JS console, an error will be printed out if there was a problem. Debugging with the Network Panel, seeing the actual request, will also help you. I looked at a few of your problem websites, and they all print out a warning message alerting you of the API being misconfigured in some way. You probably haven't turned the specific calendar api ON in the Google Developer Console.

Going forward, please don't use this thread to get Help. Follow the usual channels in http://fullcalendar.io/wiki/Support/ Thanks!
Nov 20, 2014
#94 l...@indieweb.co.nz
Not sure if this helps anyone, (jepst...@alz.org and @webmas...@ftdi.com ?), my issue was that I was grabbing the ID from my existing url parameter (v 1.6.4) - getting rid of the appropriate bits of the url - but my existing urls had the # and/or @ symbols replaced with their hex value - I think this used to be required in the old version?

Anyway, copying and pasting the ID straight from Google Calendar including any # or @ symbols solved my issue.
Nov 21, 2014
#96 parkdale...@gmail.com
Hi Adam, 

Thanks so much, my issue was that I didn't turn on the calendar API in the Google Developer Console!!!

Now I know!!  


Nov 21, 2014
#97 jepst...@alz.org
I did have my API turned on, but I had other admin issues plus a conflict in my script. I do want to say a big thank you to Adam and FC for being so responsive and helpful with this for all of us, especially sudden updates for gcal.js!! Awesome.
Nov 21, 2014
#98 da.arvid...@gmail.com
Is it somehow possible to use Fullcalendar and still have the calendars private?
Nov 21, 2014
#99 aivhelpt...@gmail.com
I have the API turned on, the query data is being returned as per evidence of the network response. The data coming in does not seem to be getting parsed in anyway shape of form .. I ended up using the Chrome CORS plugin to remove the error for 'cross domain' access .. without this i receive the typical header errors and no data is returned.... 

I can only assome it has somthign to do with how the return data is being parsed, or its returning in a format json does not understand ... though am using the className of gcal-event

These are "all" private calendars .. but for giggles i turned on the public data and still nothing was parsed.

Any direction would be great.. thanks
Nov 21, 2014
#100 aivhelpt...@gmail.com
As added oddity ... if i load the same code into firefox, its rendered in an "agenda" format, not as a calendar.
Nov 21, 2014
#101 kahanafa...@gmail.com
Similar issues; the Calendar API is turned on, but our page returns the console error "Access Not Configured. The API is not enabled for your project, or there is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your configuration"
If I swap my API key for the key used on the FullCalendar demo page, my events show up (this uses my CalID and FullCalendar's API key):
http://kahanafalls.com/test/gcal.html
I've checked stackoverflow for a solution; most suggest turning on the OAuth for the project, but I don't see any reference to that in this thread, or in the FullCal docs.
Nov 21, 2014
#102 rich...@ampersandstudio.uk
In the API browser key leave the referrers blank and see if that helps. I've had an issue where the referrer was fine on some machines and others returned the API configuration error.

Richard
Nov 21, 2014
#103 pacifics...@gmail.com
Richard,
Thank you so much! This solved our problem. We had been following Google's suggestion for the referrer field (using the pattern *.example.com/*) but deleting that and allowing any referrer works.
Nov 21, 2014
#104 rich...@ampersandstudio.uk
I followed googles suggestion too but clearly something's not right with it!

Rich
Nov 23, 2014
#105 jimd...@gmail.com
Same question as #98: Is it somehow possible to use Fullcalendar and still have the calendars private?  This of course worked in previous versions.

I have switched to 2.2.2, plugged in my API key, and can display public events just fine. But using EventSources and a url of an xml file from a private Google calendar does not work.

Is this a supported feature?  If not, is there a guesstimate on if/when it will be?

Thanks,
-Jim

Nov 23, 2014
#106 gerlando...@gmail.com
Hi,

I've got the same problem stated by da.arvid...@gmail.com in comments #84 and #98.
I'd like to read-access my own calendars (previously done through the private URL listed on Google Calendar), and by no means do I want to make them public.

The private URL still seems to work when opened on my web browser and gives me an RSS feed -- though I'm afraid there won't be any way to get this to filter by date or to provide the data in JSON format (which I guess is what FullCalendar expects).

So I'm afraid the only way would be to implement the whole OAuth2 hassle (on which I am no expert at all BTW), by creating a OAuth Client-ID, having the code generate OAuth Authorization requests, get an access token from there and hand it over the Google Calendar API v3 (instead of the static, much simpler, public API Key).
Is my understanding right? Could anyone please confirm this?
Thank you!
Nov 25, 2014
#107 aivhelpt...@gmail.com
Oauth didnt work when enabled and authorized with my dev account.
Nov 25, 2014
Project Member #108 adamrs...@gmail.com
Private Google Calendar feeds are now impossible to do. Please read and star  Issue 2377  for all related future discussion.

In other news, version 2.2.3 was just released:
- allows feed ID's that are personal email addresses @gmail.com and @googlemail.com to be recognized when they are specified as a single string
- removeEventSource works with Google Calendar object ( Issue 2368 )

Again, going forward, please use the Support page instead of commenting on this issue.
http://fullcalendar.io/wiki/Support/
Nov 28, 2014
#110 fontana....@gmail.com
The only way that i found to make something similar like that is to syncronize the events and then format then to a json's file with all the fields that i need and then use the fullcalendar's ajax feature to retrieve the events through a php file that reads that json .. hope it helps someone
Dec 8, 2014
#111 SDKIndus...@gmail.com
Is there a work-around or some code you can supply to allow people using the private URLS to continue to work?  I know you said it's impossible, then what's the solution to access them? 
Jan 5, 2015
#112 neerajd...@gmail.com
Hi, 
How can i implement the freeze column in resource view? i want to freeze the first 3 to 4 column and then horizontally scrollable on other column not horizontal scroll on complete page.

is there any way to do that. 
Sign in to add a comment

Powered by Google Project Hosting