diff -r 4c86151704e9 -r 3daa4039509a web/rsln/tweet.php --- a/web/rsln/tweet.php Fri Apr 22 12:31:41 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -getHttpClient($configuration); - $client->setUri('http://twitter.com/statuses/update.json'); - $client->setMethod(Zend_Http_Client::POST); - $client->setParameterPost('status', $_POST['status']); - $response = $client->request(); - - /** - * Check if the json response refers to our tweet details (assume it - * means it was successfully posted). API gurus can correct me. - */ - $data = json_decode($response->getBody()); - $result = $response->getBody(); - if (isset($data->text)) { - $result = 'true'; - } - /** - * Tweet sent (hopefully), redirect back home... - */ - header('Location: ' . URL_ROOT . '?result=' . $result); -} else { - /** - * Mistaken request? Some malfeasant trying something? - */ - exit('Invalid tweet request. Oops. Sorry.'); -}