function startApp() {
  gapi.load('auth2', function() {
    gapi.client.load('plus','v1').then(function() {
      gapi.signin2.render('signin-button', {
          scope: 'https://www.googleapis.com/auth/plus.login',
          fetch_basic_profile: false });
      gapi.auth2.init({fetch_basic_profile: false,
          scope:'https://www.googleapis.com/auth/plus.login'}).then(
            function (){
              console.log('init');
              auth2 = gapi.auth2.getAuthInstance();//nos devuelve el objeto identificado
              auth2.isSignedIn.listen(updateSignIn);
              auth2.then(updateSignIn);
            });
    });
  });
}
/**
 * This method sets up the sign-in listener after the client library loads.
 */
This method sets up the sign-in listener after the client library loads.
This method sets up the sign - in listener after the client library loads .
function startApp() {
  gapi.load('auth2', function() {
    gapi.client.load('plus','v1').then(function() {
      gapi.signin2.render('signin-button', {
          scope: 'https://www.googleapis.com/auth/plus.login',
          fetch_basic_profile: false });
      gapi.auth2.init({fetch_basic_profile: false,
          scope:'https://www.googleapis.com/auth/plus.login'}).then(
            function (){
              console.log('init');
              auth2 = gapi.auth2.getAuthInstance();
              auth2.isSignedIn.listen(updateSignIn);
              auth2.then(updateSignIn);
            });
    });
  });
}
function startApp ( ) { gapi . load ( 'auth2' , function ( ) { gapi . client . load ( 'plus' , 'v1' ) . then ( function ( ) { gapi . signin2 . render ( 'signin-button' , { scope : 'https://www.googleapis.com/auth/plus.login' , fetch_basic_profile : false } ) ; gapi . auth2 . init ( { fetch_basic_profile : false , scope : 'https://www.googleapis.com/auth/plus.login' } ) . then ( function ( ) { console . log ( 'init' ) ; auth2 = gapi . auth2 . getAuthInstance ( ) ; auth2 . isSignedIn . listen ( updateSignIn ) ; auth2 . then ( updateSignIn ) ; } ) ; } ) ; } ) ; }
This method sets up the sign-in listener after the client library loads.
This method sets up the sign - in listener after the client library loads .
//nos devuelve el objeto identificado