【问题标题】:Is it necessary to use google apps account to use Google+ Domain API's?是否需要使用 Google Apps 帐户才能使用 Google+ Domain API?
【发布时间】:2015-04-17 07:51:28
【问题描述】:

我正在尝试通过以下 api 调用获取用户的圈子信息

xhr.open("GET", "https://www.googleapis.com/plusDomains/v1/people/me/circles?alt=json&access_token=" + googleAuth.getAccessToken());

它给出的响应文本为

{"error":{"errors":[{"domain":"global","reason":"forbidden","message":"Forbidden"}],"code":403,"message":"Forbidden"}}

我已启用 google+ 域 api

【问题讨论】:

标签: javascript ios google-api google-plus google-oauth


【解决方案1】:

Google+ 域 API 与 Google+ API 不同。

您的问题是说您正在尝试查找user circle,Google+ API 并未准确地为您提供此信息。

API 最接近这一点的是People.list

https://www.googleapis.com/plus/v1/people/me/people/connected?key={YOUR_API_KEY}

尝试测试该系列,看看哪一个更适合您的需求。他们每个人都会给你一份人员名单。您可以在页面底部测试结果。无法取回圈子的名称。

可接受的值为:

"connected": 认证用户的可见人列表 也使用请求应用的圈子。此列表仅限于用户 谁让经过身份验证的用户可以看到他们的应用活动。

“可见”:此用户已添加到一个或多个的人员列表 圈子,仅限于请求应用程序可见的圈子。

这个问题可能与您昨天发布的问题有关。 Get list of circles of a user using Google Plus API

【讨论】:

    【解决方案2】:

    正确,Google+ Domains API 方法不适用于 @gmail.com Google 帐户。他们需要 Google Apps 帐户。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-07
      • 2011-03-06
      相关资源
      最近更新 更多