我可以通过与Contacts API v3的联系获取姓名和地址等。但是,我似乎无法弄清楚如何过生日。 I have found this link though, but I don't really understand it since its quite different from the others.
$return[] = array (
'firstname'=> $contact['gd$name']['gd$givenName']['$t'],
'lastname'=> $contact['gd$name']['gd$familyName']['$t'],
'email' => $contact['gd$email'][0]['address'],
'phoneNumber' => $contact['gd$phoneNumber'][0]['$t'],
'city' => $contact['gd$structuredPostalAddress'][0]['gd$city']['$t'],
'street' => $contact['gd$structuredPostalAddress'][0]['gd$street']['$t'],
'country' => $contact['gd$structuredPostalAddress'][0]['gd$country']['$t'],
//I need to know what tu put here
'birthday' => $contact['gcontact$birthday'],
);
答案 0 :(得分:1)
处理生日日期存在一个长期存在的问题,由于某些原因谷歌目前尚未修复多年。
https://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3246
答案 1 :(得分:0)
在您的代码中添加此内容以从联系人API获取生日
'birthday' => $contact['gContact$birthday']['when'],