I am trying to get the contacts of a user from Yahoo, I'm using the PHP SDK.
But I keep getting an empty result:
{ ["query"]=> object(stdClass)#14 (4) { ["count"]=> int(0) ["created"]=> string(20) "2012-11-06T18:05:30Z" ["lang"]=> string(5) "en-US" ["results"]=> NULL } }
As far as I can tell, the authentication is working fine, but I just get no result here...
This is the code I am using to get the result above:
$session = YahooSession::requireSession($yahooConsumerKey,$yahooConsumerSecret,$yahooAppID);
$query = sprintf("select * from social.contacts where guid=me;");
$response = $session->query($query);
var_dump($response);
/**** printing the contact emails starts ****/
if(isset($response)){
foreach($response->query->results->contact as $id){
foreach($id->fields as $subid){
if( $subid->type == 'email' )
echo $subid->value."<br />";
}
}
}
Thanks in advance!