title: Google Realtime and JavaFX WebView
body: <p>So, I am attempting to use the Google Realtime Javascript API through a WebView in a vanilla JavaFX application.. without really knowing what I am doing mainly because my knowledge of web development and JavaScript is quite weak.</p>
  
  <p>I've started simply by bundling the index.html and the realtime-client-utils.js with my JavaFX app and attempting to get the quickstart example working in a WebView.</p>
  
  <p>I am already using the Java Google Drive API in my app, so I have a valid client ID.</p>
  
  <p>I simply got stuck in authentication... the application does not authenticate and clicking the "You must authorize"-button does nothing at all. It should open a login popup, as far as I understood.</p>
  
  <p>Here's a snippet of code from the realtime-client-utils.js, this code ought to be called when the button is clicked, but like I said, nothing happens.</p>
  
  <pre><code>var authorizeWithPopup = function() {
      gapi.auth.authorize({
        client_id: clientId,
        scope: [
          rtclient.INSTALL_SCOPE,
          rtclient.FILE_SCOPE,
          rtclient.OPENID_SCOPE
        ],
        user_id: userId,
        immediate: false
      }, handleAuthResult);
      console.log(clientId);
    };
  </code></pre>
  
  <p>What might be wrong?</p>
  
  <p>Has anyone here successfully used the Realtime API with JavaFX WebView?</p>
  
  <p>Does anyone know if Google has plans to create a Java API for it's realtime engine?</p>