(извините за мой плохой английский)
У меня возникла ошибка при обновлении имен:
Код: Выделить всё
$client=client_google();
$google_id="people/c3062123412341234";
if ($client->getAccessToken() == "") return null;
$people_service = new Google_Service_PeopleService($client);
$person = new Google_Service_PeopleService_Person();
if($tipenya == "Cancel"){
$name = new Google_Service_PeopleService_Name();
$name->SetFamilyName("Keluarga Cemara");
$name->SetGivenName("Tampan");
$person->setNames($name);
$profile = $people_service->people->get(
$google_id,
array('personFields' => 'metadata'));
$etag = $profile->etag;
$person->setEtag($etag);
$person->setResourceName($google_id);
if($google_id !=''){
//$people_service->people->updatePersonField("names");
$people_service->people->updateContact($google_id,$person);
}
}else if($tipenya=="Delete"){
if($google_id !=''){
$person->setResourceName($google_id);
$people_service->people->deleteContact($person);
}
}
исключение «Google_Service_Exception» с сообщением «{
«error»: {
«code»: 400,
«message»: «Требуется маска updatePersonFields. Укажите один или несколько допустимых путей. Допустимые пути документированы по адресу https://developers.google.com/people/ap ... ple/update.",
"errors": [
{
"message": "требуется маска updatePersonFields. Укажите один или несколько допустимых путей. Допустимые пути описаны по адресу https://developers.google.com/people/ap ... ple/update.",
"domain": "global",
"reason": "badRequest"
],
"status": "INVALID_ARGUMENT" }}'
Подробнее здесь: https://stackoverflow.com/questions/509 ... e-with-php
Мобильная версия