谷歌联系人API与谷歌JavaScript客户端库 [英] Google Contacts API with Google JavaScript Client Lib

查看:152
本文介绍了谷歌联系人API与谷歌JavaScript客户端库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Google通讯录API v3

由于OAuth2身份验证和授权,我开始使用 Google用于JavaScript的API客户端库
我在那部分API访问中遇到了 no 问题。

Because of the OAuth2 authentication and authorization I'm started with the Google APIs Client Library for JavaScript. I have no problems with that part of the API access.

但是在完成auth部分之后,我不知道是什么做下一步。我可以使用Google Contacts API v3的 google-api-javascript-client 吗?在 javascript客户端支持的Google API列表中,联系人API未显示。但我可以使用 OAuth 2.0 Playground工具进行访问。

But after doing the auth part I don't know what to do next. Can I use the google-api-javascript-client for the Google Contacts API v3? In the list of the supported Google APIs by the javascript-client the contacts API does not appear. But I have full access with the OAuth 2.0 Playground tool.

我真的很困惑哪个客户端最适合使用最新的Google Contacts API。什么是 gdata-javascript-client

I am really confused which client is working best with the latest Google Contacts API. What is about the gdata-javascript-client?

推荐答案

要使用gapi提供的身份验证令牌(Google JS客户端库)来访问v3联系人api,使用 alt =& json

To use the v3 contacts api with the authentication token provided by gapi (Google JS client lib) this one is helpful, using 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));
});

这篇关于谷歌联系人API与谷歌JavaScript客户端库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆