示例#1
0
 /**
  * Helper function that populates the $result array with
  * all the row ids that match the given $flid and $id pair.
  *
  * @param  $flid    id of the friend list
  * @param  $id      if specified, only gets row ids for
  *                  rows matching this user id as a member
  * @param  $result  array passed by reference that will be populated
  *                  with the row ids, all mapping to 1
  */
 private function get_all_members($flid, $id, &$result)
 {
     $members = friend_list_get_members($flid);
     if ($id) {
         if (isset($members[$id])) {
             $result["{$flid}:{$id}"] = 1;
         }
     } else {
         foreach ($members as $member_id) {
             $result["{$flid}:{$member_id}"] = 1;
         }
     }
 }
示例#2
0
 protected function friends_getListMembers($flid)
 {
     if (!$flid || !friend_list_is_owner($flid, $this->user_id)) {
         $this->throw_code(api10_FacebookApiErrorCode::API_EC_PARAM);
     }
     $members = friend_list_get_members($flid);
     if (!is_array($members)) {
         $this->throw_code(api10_FacebookApiErrorCode::API_EC_UNKNOWN);
     }
     return $members;
 }