Permalink
Browse files

updated readme with addContact example

  • Loading branch information...
1 parent 786fe4f commit fabd0659b8b4214b3f88105c2c54298b01f9970b basictheory committed Oct 10, 2009
Showing with 11 additions and 0 deletions.
  1. +11 −0 README.markdown
View
@@ -158,6 +158,17 @@ See the bundled sample code in examples/yql/delicious.php.
See the bundled sample code in examples/opensocial/profile.php.
+## Adding a Contact:
+
+ # valid 'Yahoo! Contacts Read/Write' scopes are required to support this method.
+
+ $contact_fields = array();
+ $contact_fields[] = array('type' => 'email', 'value' => 'me@domain.com');
+ $contact_fields[] = array('type' => 'name', 'value' => array('givenName'=> 'John', 'familyName' => 'Doe'));
+ $contact = array('fields' => $contact_fields);
+
+ var_dump($oauthapp->addContact($contact));
+
Tests
=====

0 comments on commit fabd065

Please sign in to comment.