Important Currently only Facebook, Twitter, Identica, LinkedIn, QQ, Sina, Murmur, Pixnet and Plurk do support this feature. Others providers will throw an exception (#8 "Provider does not support this feature"), when getUserContacts() is called. Please refer to the user guide to know more about each adapters capabilities.

Same with the user's profile, after authenfication, HybridAuth can provide the connected user contact list's in a rich, simple and standardized structure across all the social APIs.


  // init hybridauth
  $hybridauth = new Hybrid_Auth( $config );

  // try to authenticate with twitter
  $adapter = $hybridauth->authenticate( "Twitter" );

  // grab the user's friends list
  $user_contacts = $adapter->getUserContacts();

  // iterate over the user friends list
  foreach( $user_contacts as $contact ){
     echo $contact->displayName . " " . $contact->profileURL . "<hr />";

Hybrid_User_Contact object

Object Data Members :

Field Name Type Short description
identifier  String The Unique contact's ID on the connected provider. Usually an interger.
profileURL  String URL link to profile page on the IDp web site
webSiteURL  String User website, blog, web page,
photoURL  String URL link to user photo or avatar
displayName  String User dispalyName provided by the IDp or a concatenation of first and last name.
description  String A short about_me or the last contact status
email  String User email. Not all of IDp garant access to the user email