0

Ich brauche Hilfe bei der Erlangung der Google-Kontaktdaten E-Mail, Telefonnummer in ionischen, Cordova mit $ cordovaOauth.

Antwort

0

google oauth api in google Konsole api erstellen wie '1234567890-qhjnn7du9jrnhchuu66cc08i7pbuaaod.apps.googleusercontent.com'

$ scope.googleinvite = function() {

$cordovaOauth.google("1234567890-qhjnn7du9jrnhchuu66cc08i7pbuaaod.apps.googleusercontent.com", ["https://www.google.com/m8/feeds"]).then(function(result) { 
     console.log(result) 
     var googleaccount = $http({ 
      method: 'GET', 
      url: 'https://www.google.com/m8/feeds/contacts/default/full?access_token=' + result.access_token + "&alt=json&max-results=5000", 
      dataType: "jsonp", 
     }); 
     googleaccount.success(function(response) { 
      console.log(response); 
     }); 
    }, 
    function(error) { 
     console.log("Error -> " + error); 
    }); 

}

Verwandte Themen