I am attempting to create a php function that adds a new google
contact.  And out of all the example code I have found, none of them
add phone numbers nor postal addresses.  Is this possible?

My code that have tried for the phone number is...

        // add phone elements
        $phoneNumber = $doc->createElement('gd:phoneNumber');
        $phoneNumber->setAttribute('phoneNumber', '503-123-4567');
        $phoneNumber->setAttribute('rel' ,'http://schemas.google.com/g/
2005#work');
        $entry->appendChild($phoneNumber);

I get an error message that says...

ERROR:Expected response code 200, got 400 phone number must not be
empty.

The phone number is clearly in the code, yet google thinks its empty.

-- 
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles APIs" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://code.google.com/apis/contacts/community/forum.html

Reply via email to