Try grabbing the HTTP request and response with a debugging proxy like Charles. That will let us know what's really being sent and received.
-- Ed Finkler http://funkatron.com AIM: funka7ron ICQ: 3922133 Skype: funka7ron On Thu, Dec 11, 2008 at 1:14 AM, sMan <[EMAIL PROTECTED]> wrote: > > Oops, sorry for the lack of detail. Here is the body of the > postTwitter method (as i said, I'm able to post to other twitter URLs > within the API with this same piece of code): > > def postTwitter(url, hashParams) > url = URI.parse(url) > > req = Net::HTTP::Post.new(url.path) > req.basic_auth($username, $password) > req.set_form_data(hashParams, ';') > > res = Net::HTTP.new($twitter, $twitPort).start {|http| http.request > (req) } > puts res > > case res > when Net::HTTPSuccess, Net::HTTPRedirection > return 'true' > else > return 'false' > end > end > > On Dec 10, 5:00 pm, "Alex Payne" <[EMAIL PROTECTED]> wrote: >> If you provide the full request/response output from your call to the >> method, I'm sure somewhat can tell you what's going on. Thanks! >> >> >> >> On Wed, Dec 10, 2008 at 16:36, sMan <[EMAIL PROTECTED]> wrote: >> >> > Hi guys, I just started kicking the tires on the API (thanks, btw!) >> > and am having a horrendous time posting to /direct_messages/new.xml. >> > The response that comes back is "invalid request" which doesn't give >> > me much to debug or go off of. I am able to post to the udpate/status >> > urls just fine so I dont think its my code. here is how I'm doing the >> > post in Ruby: >> >> > postTwitter("http://twitter.com/direct_messages/new.xml", {"text" => >> > 'this is a test', "user" => 'saumil}) >> >> > postTwitter is my wrapper method to execute the http request and works >> > for other urls, just not this one. >> >> > Thanks! >> > --S >> >> -- >> Alex Payne - API Lead, Twitter, Inc.http://twitter.com/al3x >
