I am currently using LightOpenID so that users can register on my site where I can automatically retrieve their username and email address:
$openid->required = array('namePerson/first', 'namePerson/last', 'contact/email'); $openid->identity = 'https://www.google.com/accounts/o8/id';
Here I use the parameters namePerson/first , namePerson/last and contact/email .
I understand that to get a list of user contacts I need to use the feed:
https:
However, I canβt understand what parameters I need to use for this?
If I completely delete the parameter string, I just return an empty array.
Can anyone help me figure out what options I need to get contacts?
Here is the current code that I have:
<?php require '/var/www/libraries/openid.php'; try { $openid = new LightOpenID; if(!$openid->mode) { //$openid->required = array('gd/fullName'); $openid->identity = 'https://www.google.com/m8/feeds/contacts/oshirowanen.y%40gmail.com/full'; header('Location: ' . $openid->authUrl()); exit; } elseif($openid->mode == 'cancel') { echo "cancelled"; exit; } else { if ( $openid->validate() ) { $returned = $openid->getAttributes(); print_r($returned); exit; } else { echo "something is wrong"; exit; } } } catch(ErrorException $e) { echo $e->getMessage(); } ?>
oshirowanen
source share