From 7951bbaddd3fcfc175b049bb5c6bffbefca15c84 Mon Sep 17 00:00:00 2001 From: jdp Date: Sun, 24 May 2009 05:35:37 -0400 Subject: [PATCH] Fixed favorites methods, removed debug output --- twitter.lib.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/twitter.lib.php b/twitter.lib.php index 74bc489..e75556b 100644 --- a/twitter.lib.php +++ b/twitter.lib.php @@ -357,8 +357,7 @@ function getFavorites($options = array(), $format = 'xml') { * @return string */ function createFavorite($id, $format = 'xml') { - $options = array('id' => $id); - return $this->apiCall('favorites/create', 'post', $format, $options); + return $this->apiCall("favorites/create/{$id}", 'post', $format, array()); } /** @@ -368,8 +367,7 @@ function createFavorite($id, $format = 'xml') { * @return string */ function destroyFavorite($id, $format = 'xml') { - $options = array('id' => $id); - return $this->apiCall('favorites/destroy', 'post', $format, $options); + return $this->apiCall("favorites/destroy/{$id}", 'post', $format, array()); } /** @@ -511,7 +509,7 @@ protected function apiCall($twitter_method, $http_method, $format, $options, $re if (($http_method == 'get') && (count($options) > 0)) { $api_url .= '?' . http_build_query($options); } - echo $api_url . "\n"; + //echo $api_url . "\n"; curl_setopt($curl_handle, CURLOPT_URL, $api_url); if ($require_credentials) { curl_setopt($curl_handle, CURLOPT_USERPWD, $this->credentials);