我需要帮助获取 google 联系方式的电子邮件,电话号码在 ionic 中,cordova with $cordovaOauth
。
create google oauth api in google console api like '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);
});
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.