Twitter rate-limits the the Search API, more details can be found here:

http://apiwiki.twitter.com/Rate-limiting

If you use a custom User-Agent request header, the rate-limiting is
less severe. You may want to give that a shot.

Hope this helps,
David

On Mon, Mar 1, 2010 at 12:41 PM, Daniel Lopes <[email protected]> wrote:
> It's the first time I try heroku but it became a big headache.
>
> I did a really simple sinatra app but when I try to run it on heroku
> instead of my local machine or another host it break without any
> reason. The problem happens when I try to access
> Net::HTTP.get_response ... take a look:
>
> response = Net::HTTP.get_response(URI.parse("http://search.twitter.com/
> search.json?rpp=100&q=%23promorails"))
>
> Local Machine:
>
> daniellopes:~/Works/twicket/twicket (master)$ irb
>>> response = 
>>> Net::HTTP.get_response(URI.parse("http://search.twitter.com/search.json?rpp=100&q=%23promorails";))
> => #<Net::HTTPOK 200 OK readbody=true>
>>> exit
>
> daniellopes:~/Works/twicket/twicket (master)$ heroku console
> Ruby console for twicket.heroku.com
>>> response = 
>>> Net::HTTP.get_response(URI.parse("http://search.twitter.com/search.json?rpp=100&q=%23promorails";))
> => #<Net::HTTPBadRequest 400 Bad Request readbody=true>
>
> I dig deep in the docs but can't found anything related to this.
> Somebody have any idea what it can be?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Heroku" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/heroku?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to