1

Hi currently using people API by google, But i am having some errors on request "api.client.people.people.connections.list" on API.

The picture below will show the error, The first picture is the console error. and the other one is the code error it shows that the list is cannot read property of undefined. The code is in below.

enter image description here

    var request = gapi.client.people.people.connections.list({
    'resourceName': 'people/me',
    'requestMask.includeField': ['person.phoneNumbers', 'person.names','person.emailAddresses'],
    'sortOrder' : 'FIRST_NAME_ASCENDING',
    'pageSize': 500,
});
4

2 回答 2

1

我也遇到了这个问题,他们的教程也有同样的问题https://developers.google.com/people/quickstart/js

现在你必须做gapi.client.people.people.me.connections.list

并且list不再需要resourceName参数,您可以在这里看到https://developers.google.com/people/api/rest/v1/people.connections/list

如果他们能更新他们的教程会很好......

于 2017-02-14T15:48:57.990 回答
0

这在今天有效。

    gapi.client.people.people.connections.list({

接受的答案发布于 2017 年,因此 API 可能以某种方式发生了变化,但我复制了上述函数的代码,并且该调用对我有用。您可以在以下位置找到完整的源代码:https ://developers.google.com/people/quickstart/js

于 2020-04-29T17:37:23.967 回答