【问题标题】:get contact list with yahoo api使用 yahoo api 获取联系人列表
【发布时间】:2014-08-04 17:33:48
【问题描述】:

我想使用 yahoo api 获取用户 yahoo 联系人并在页面中显示我的代码:

// if a session is initialized, fetch the user's profile information
    if($session) {
    // Get the currently sessioned user.
      $user = $session->getSessionedUser();
    //var_dump($user);

    // Load the profile for the current user.
    $profile = $user->getProfile();
    $profile_contacts=XmltoArray($user->getContactSync());
    var_dump( $profile_contacts);
    $contacts=array();
    foreach($profile_contacts['contactsync']['contacts'] as $key=>$profileContact){
      foreach($profileContact['fields'] as $contact){
        $contacts[$key][$contact['type']]=$contact['value'];
       }
     }
  //echo "<pre/>";
  //print_r($contacts);exit; 
  }

但是 $contact 是空的,我不知道请帮忙

【问题讨论】:

    标签: oauth yahoo-api


    【解决方案1】:

    您可以通过这种方式查看响应 $response = $user->getContacts(); var_dump($response); 并找到你的问题

    【讨论】:

      猜你喜欢
      • 2013-12-27
      • 2012-08-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-28
      • 2015-01-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多