Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/262.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Google People API/方法:contactGroups.list_Php_Rest_Api_Google Contacts Api_Google People - Fatal编程技术网

Php Google People API/方法:contactGroups.list

Php Google People API/方法:contactGroups.list,php,rest,api,google-contacts-api,google-people,Php,Rest,Api,Google Contacts Api,Google People,这是我用来从Google People API获取联系人的示例代码。很好 $people_service = new Google_Service_PeopleService($client); // TODO: Use service object to request People data $connections = $people_service->people_connections->listPeopleConnections ('people/me', ar

这是我用来从Google People API获取联系人的示例代码。很好

$people_service = new Google_Service_PeopleService($client); // TODO: Use service object to request People data

$connections = $people_service->people_connections->listPeopleConnections ('people/me',
    array('personFields' => 'names,emailAddresses,biographies',
    'pageSize' => 25,
    'sortOrder' => 'FIRST_NAME_ASCENDING',
    ));
但我不知道如何列出和管理联系人组(如朋友、家人等)

这是我正在尝试的代码,但没有成功

$groups_list = $people_service->contactGroups->listcontactGroups();
我可以找到的资料来源:


您是否已检查是否需要调用本节中所述的额外函数?请按照以下步骤打印最多10个连接的名称

$groups_list = $people_service->contactGroups->listcontactGroups();

$group_list->getContactGroups( );

我认为还有一个类的名字是Google\u Service\u PeopleService\u ContactGroup。但我仍然不知道如何给我的团队打电话。请详细说明问题所在。你有错误吗?你得到的答复是空的吗?谢谢你,阿莫斯。Rebot先生的解决方案奏效了。有趣的是,我一看到你的建议就尝试了一下,但没有奏效(显然我犯了一个错误)。从昨天开始我尝试了很多其他的方法。几分钟前,我又试了一次,现在它工作了。谢谢你,雷伯特先生。