如何获得谷歌联系人用户名,电子邮件和个人资料图片?

时间:2013-03-28 08:32:45

标签: google-contacts

我需要帮助才能获取Google联系人详细信息usernameemailpicture。这段代码工作正常:

var config = {
  'client_id': 'XXXXXXXXXXXX.apps.googleusercontent.com',
  //'scope': 'https://www.googleapis.com/auth/urlshortener',
  'scope': 'https://www.google.com/m8/feeds'
};

gapi.auth.authorize(config, function () {
  var authParams = gapi.auth.getToken(); // from Google oAuth
  authParams.alt = 'json';
  $.ajax({
    url: 'https://www.google.com/m8/feeds/contacts/default/full',
    dataType: 'jsonp',
    data: authParams,
    success: function (data) {
      alert(JSON.stringify(data))
    }
  });
});

此数据仅显示用户电子邮件地址,但我还需要用户名和个人资料照片。

这可能吗?请帮帮我。

0 个答案:

没有答案
相关问题