2016-02-12 97 views
0

我能够通过联系人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

在代码中添加这从联系人API获得生日

'birthday' => $contact['gContact$birthday']['when'],