javascript - Uncaught TypeError: undefined is not a function on Google Plus Login -


I'm trying to implement Google Plus login and its own code

  $ ('(' Click ', function) {var myParams = {' clientid ':' My ID.apps.googleusercontent.com ',' cookiepolicy ':' single_host_corein ',' callback ':' GPlogin ',' acceptance ': 'Force', 'radius': 'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/plus.profile.emails.read'}; Gapi.auth SignIn (myParams);}); Function GPlogin (results) {console.log (results); If (result ['condition'] ['signed_in']) {var request = gapi.client.plus.people.get ({'userId': 'me'}); (I = 0; i & lt; resp ['email']. Length; i ++) {if (resp [e-mail] 'email'] [i] ['type'] == 'account') { Email = resp ['email'] [i] ['value'];}}} var str = "name:" + resp ['display_ame'] + "
"; Str + = "picture:" + resp ['image'] ['url'] + "
"; Str + = "& lt; img src = '" + Resp [' image '] [' url '] + "' /> gt;
"; Str + = "URL:" + resp ['url'] + "& lt; br & gt;"; Str + = "email:" + email + "& lt; br & gt;" console.log (str);}); }} Function Onload Callback () {//gapi.client.setApiKey('My API Key '); // Set your API key gapi.client.load ('plus', 'v1', function () {}); // Load Google + API} (function () {var p = document.createElement ('script'); Po.type = 'text / javascript'; po.async = true; po.src = 'https: // Plus.google.com/js/client:plusone.js?onload=loadGApi '; var s = Document GetElementsByTagName (' script ') [0]; s.parentNode.insertBefore (po, s);});

first asked for my permissions for the modal window and then I got the error in the console

UnkeyType Error: Undefined No Function

When I'm pressing on the login button, I ask offline access permission and I get an error in the console


Comments