components->friends->getList(userID); //Check for errors if($friendsList === false) Rest_fatal_error(500, "Couldn't get friends list !"); //Return list return $friendsList; } }