I think I'm doing some confusion with the libraries. I'm using EpiTwitter. :S
But even though I use the method post_statusesUpdate(), the server response is the same: "bad request". I've commented the line 148, in EpiOAuth.php, 'cause I was getting a PHP warning: curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); This may be causing the request error? I'd better use the Abraham's library? Thanks, Straube On 25 jun, 17:00, Sam Wierema <[email protected]> wrote: > If you're using Abraham's library you should drop the .json and the > first slash in the call: > $return = $twitter->post( 'statuses/update', array( 'status' => > 'TEST' ) ); > > If you're using EpiTwitter (not Abraham's library) you should probably > use something like this (according to > this:http://wiki.github.com/jmathai/twitter-async/#methodnames): > $return = $twitter->post_statusesUpdate( array( 'status' => > 'TEST' ) ); > > On Jun 25, 8:14 pm, Straube <[email protected]> wrote: > > > > > Hi, > > > I'm trying to update an account status with the Abraham's PHP Library, > > but I'm getting the following exception message: > > > Bad request / Your browser sent a request that this server could not > > understand. > > > I've already authorized my application to connect with my test account > > and I saved the authentication data in constants. I'm using the code > > bellow to do the update: > > > try { > > $twitter = new EpiTwitter(Config::TWITTER_APP_TOKEN, > > Config::TWITTER_APP_SECRET, Config::TWITTER_OAUTH_TOKEN, > > Config::TWITTER_OAUTH_SECRET); > > $return = $twitter->post('/statuses/update.json', array ( 'status' > > => 'TEST' )); > > echo $return->response;} catch (Exception $e) { > > > echo $e->getMessage(); > > > } > > > API methods that uses 'get' instead of 'post' (e.g. account/ > > verify_credentials) works without problem. > > > Thanks in advance. > > > Straube
