#yahoo #yahoo-api
#yahoo #yahoo-api
Вопрос:
У меня есть следующий код для извлечения контактов yahoo через его API, однако он не извлекает никаких контактов. Вот мой код:
session_start();
include_once 'config.php'; //This file contains consumer key amp; all data
require_once ('Yahoo.inc'); //This is a standard Yahoo file, just copied it
$session = YahooSession::requireSession($consumer_key,$consumer_secret,$app_id);
if (is_object($session))
{
$user = $session->getSessionedUser(); //This is NOT NULL
$profile = $user->getProfile(); //This is NULL
$name = $profile->givenNme;
$guid = $profile->guid;
$contacts=$user->getContacts()->contacts; //This is NULL
if($contacts==NULL){
echo "No contacts";
}
}
Каким-то образом getProfile()
amp; getContacts()
не работают должным образом. Есть идеи, почему это не работает?