web/tweet_ajax.php
changeset 703 a0772dbfb936
parent 229 74c9ddc3640b
child 705 af8b10551286
equal deleted inserted replaced
702:9287df3d235a 703:a0772dbfb936
    16      * a preconfigured instance of Zend_Http_Client which automatically
    16      * a preconfigured instance of Zend_Http_Client which automatically
    17      * signs and encodes all our requests without additional work
    17      * signs and encodes all our requests without additional work
    18      */
    18      */
    19     $token = unserialize($_SESSION['TWITTER_ACCESS_TOKEN']);
    19     $token = unserialize($_SESSION['TWITTER_ACCESS_TOKEN']);
    20     $client = $token->getHttpClient($configuration);
    20     $client = $token->getHttpClient($configuration);
    21     $client->setUri('http://twitter.com/statuses/update.json');
    21     $client->setUri('https://api.twitter.com/1.1/statuses/update.json');
    22     $client->setMethod(Zend_Http_Client::POST);
    22     $client->setMethod(Zend_Http_Client::POST);
    23     $client->setParameterPost('status', $_POST['status']);
    23     $client->setParameterPost('status', $_POST['status']);
    24     $response = $client->request();
    24     $response = $client->request();
    25 
    25 
    26     /**
    26     /**