如何在People API中添加详细信息

时间:2019-04-12 05:31:22

标签: google-people

我想使用google people api添加用户的完整信息。我要插入名称。但是我遇到了这个错误

  

{“错误”:{“代码”:400,“消息”:“请求包含无效的   参数。“,”错误“:[{”消息“:”请求包含无效的   参数。“,” domain“:” global“,” reason“:” badRequest“}],” status“:   “ INVALID_ARGUMENT”}}

$service = getClient();

$person = new Google_Service_PeopleService_Person();

$name = new Google_Service_PeopleService_Name();
$name->setDisplayName('Test name');
$person->setNames($name);

$exe = $service->people->createContact($person);
echo "<pre>";
print_r($exe);

0 个答案:

没有答案