我正在尝试使用 Google Contacts API v3 .
由于 OAuth2 身份验证和授权,我从 Google APIs Client Library for JavaScript 开始. 我对那部分 API 访问没有问题。
但是在完成身份验证部分后,我不知道下一步该做什么。我可以使用 google-api-javascript-client 吗?适用于 Google Contacts API v3?在list of the supported Google APIs by the javascript-client联系人 API 不会出现。但是我可以完全访问 OAuth 2.0 Playground tool .
我真的很困惑哪个客户端最适合最新的 Google Contacts API。 gdata-javascript-client 是怎么回事? ?
最佳答案
要将 v3 联系人 api 与 gapi(Google JS 客户端库)提供的身份验证 token 一起使用,这个很有帮助,使用 alt=&json
$.getJSON('https://www.google.com/m8/feeds/contacts/default/full/?access_token=' +
authResult.access_token + "&alt=json&callback=?", function(result){
console.log(JSON.stringify(result));
});
关于javascript - 带有 Google JavaScript Client Lib 的 Google Contacts API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14104309/