Hi All,

I've been reading the API documentation and this support group as well
but I can't find an answer, or a solution, to my problem.
I've been writing some js code using the Twitter API but every time I
perform a call I got back the error in subject: HTTP 400 Bad Request
and no response at all.

Here follows a pice of the code I am using (with the prototypejs
new Ajax.Request('http://twitter.com/statuses/public_timeline.json', {
  method: 'GET',
  encoding: 'UTF-8',
  onLoading: function(){
  onSuccess: function(transport) {
    debug.update("SUCCESS: " + transport.responseJSON  + "<br/>")
  onException: function(transport, exception){
    debug.update("EXCEPTION: " + exception);

here are the requests headers:
Host: twitter.com

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv: Gecko/20090715 Firefox/3.5.1

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Origin: null

Access-Control-Request-Method: GET

Access-Control-Request-Headers: x-prototype-version,x-requested-with

and the response headers:
Date: Tue, 04 Aug 2009 20:20:48 GMT

Server: hi

Last-Modified: Tue, 04 Aug 2009 20:20:48 GMT

Status: 400 Bad Request

X-RateLimit-Limit: 150

X-RateLimit-Remaining: 135

Pragma: no-cache

Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-

Content-Type: application/json; charset=utf-8

X-RateLimit-Reset: 1249417836

Expires: Tue, 31 Mar 1981 05:00:00 GMT

X-Revision: adb502e2c14207f6671fe028e3b31f3ef875fd88

X-Transaction: 1249417248-99305-1720

domain=.twitter.com; path=/

Vary: Accept-Encoding

Content-Encoding: gzip

Content-Length: 99

Connection: close

Thanks to all for your help.


Reply via email to