I'm a bit of a javascript beginner and am finding it a problem to get google api authorization (oauth2) under node-webkit. There may well be fundamental problems with doing this that I'm just not aware of.
I borrowed abit of code from thehen and flurry, as you see below. On running, a popup appears saying 'setApiKey' is undefined. Looking in the client.js library (which is minified), I can't see any 'setApiKey' method. Maybe client.js loads another external library? (I've got no idea really and hope someone can point me in the right direction.) Thanks.
var s = document.createElement("script");
s.src = "https://apis.google.com/js/client.js";
s.async = true;
document.getElementsByTagName("head")[0].appendChild(s);
s.onload = function() {
gapi.client.setApiKey('AIzaSyCtG9M0qrfx...SE6bcDRKAQoX5u5do');
self.gapi_ready = true;
}