JavaScript Initiating the Google+ Sign-In flow with JavaScript not working

I'm following the current tutorial and for some reason when ever I click on the Sign in with Google button nothing seems to happen and I'm not entirely sure why. Here is the code:

<html>
<head>
    <title></title>

    <script src="https://apis.google.com/js/client:platform.js" async defer></script>

</head>
<body>

    <meta name="google-signin-clientid" content="782332402251-os0n348u3v5vaq5kff87f5pc65ib6i19.apps.googleusercontent.com" />
    <meta name="google-signin-scope" content="https://www.googleapis.com/auth/plus.login" />
    <meta name="google-signin-requestvisibleactions" content="http://schema.org/AddAction" />
    <meta name="google-signin-cookiepolicy" content="single_host_origin" />

    <script src="https://apis.google.com/js/client:platform.js?onload=render" async defer>
         /* Executed when the APIs finish loading */
         function render() 
         {
           // Additional params including the callback, the rest of the params will
           // come from the page-level configuration.
           var additionalParams = {
             'callback': signinCallback
           };

           // Attach a click listener to a button to trigger the flow.
           var signinButton = document.getElementById('signinButton');

           signinButton.addEventListener('click', function() {
             gapi.auth.signIn(additionalParams); // Will use page level configuration
           });
         }


         function signinCallback(authResult) 
         {
              if (authResult['status']['signed_in']) {
                // Update the app to reflect a signed in user
                // Hide the sign-in button now that the user is authorized, for example:
                document.getElementById('signinButton').setAttribute('style', 'display: none');
              } else {
                // Update the app to reflect a signed out user
                // Possible error values:
                //   "user_signed_out" - User is signed-out
                //   "access_denied" - User denied access to your app
                //   "immediate_failed" - Could not automatically log in the user
                console.log('Sign-in state: ' + authResult['error']);
              }
         }
    </script>


    <button id="signinButton">Sign in with Google</button>

</body>
</html>

Any idea where I'm going wrong?

Answer:1

I have been working on nvd3 , in d3.js to make the ticks look good their is a nice() provided for ex. var yScale = d3.scale.linear() .domain([0, d3.max(dataset, function(d) { return d[1]; ...

I have been working on nvd3 , in d3.js to make the ticks look good their is a nice() provided for ex. var yScale = d3.scale.linear() .domain([0, d3.max(dataset, function(d) { return d[1]; ...

How can I add an option to resize a bootbox.alert(); ? I'm using Bootbox 4.3.0. bootbox.alert("Success",function(){ }); Here is the link for the bootbox.js library.

How can I add an option to resize a bootbox.alert(); ? I'm using Bootbox 4.3.0. bootbox.alert("Success",function(){ }); Here is the link for the bootbox.js library.

We are currently using Zend Framework 1 with Dojo forms, and are facing a recent problem with some users reporting bugs while using our forms on IE11: for example they are able to check multiple radio ...

We are currently using Zend Framework 1 with Dojo forms, and are facing a recent problem with some users reporting bugs while using our forms on IE11: for example they are able to check multiple radio ...

  1. zend framework latest version
  2. zend framework latest
  3. zend framework latest version download
  4. zend framework latest stable version
  5. zend framework 1 latest version
  6. zend framework 2 latest version
  7. php zend framework latest version

first of all just want to say that i'm not a programer but i'm trying to replicate a code and since my javascript is not the best i'm failing at it. The "animation" in css/java/wtv i'm trying to ...

first of all just want to say that i'm not a programer but i'm trying to replicate a code and since my javascript is not the best i'm failing at it. The "animation" in css/java/wtv i'm trying to ...

  1. make hover stay