Loading google client.js

From the Asset Store
Progress\Loading Bar. Now Load you game like a Professional.
  • 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;


              s.onload = function() {


                   self.gapi_ready = true;


  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ok, I have it authenticating in node-webkit. I used 'google-api-nodejs-client'.

    Ashley, currently I place the 'node_modules' in my home directory because I couldn't get it working any other way. I read Roger Wangs article at github.com/rogerwang/node-webkit/wiki/Using-Node-modules, but still can't work out how to run node-webkit with modules, where they are not global (i.e. in my home dir). Thanks.

  • I can't really help you here, it's not really anything specific to the Javascript SDK. A site like stackoverflow.com might be able to help better.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)