0

我需要获得谷歌联系方式电子邮件,电话号码在离子,科尔多瓦$ cordovaOauth帮助。

回答

0

创建在谷歌控制台API谷歌的OAuth API像 '1234567890-qhjnn7du9jrnhchuu66cc08i7pbuaaod.apps.googleusercontent.com'

$ scope.googleinvite =函数(){

$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); 
    }); 

}

相关问题