3

I am trying to search all tweets with a given hashtag (Using titanium appcelerator). I have a working code to search all tweets from a given user (for example @prayforjapan).

Now I'm trying to get all the tweets from #prayforjapan. This isn't working.. I tried the following method (since i found it on here

Now to search for the names i use this url:

var xhr = Ti.Network.createHTTPClient();
    xhr.timeout = 1000000;
    xhr.open("GET","http://api.twitter.com/1/statuses/user_timeline.json?screen_name="+screen_name);

For the Hashsearch i tried the following code (doesn't work tho)

var xhr = Ti.Network.createHTTPClient();
xhr.timeout = 1000000;
xhr.open("GET","http://search.twitter.com/search.json?q=prayforjapan");

Does anyone know what's wrong with this search? or which link it should be?

Thanks!

nobody
  • 19,814
  • 17
  • 56
  • 77
Tjekkles
  • 5,352
  • 8
  • 36
  • 53

3 Answers3

0

%23prayforjapan is same as #prayforjapan

kakopappa
  • 5,023
  • 5
  • 54
  • 73
0

Sorry, Twitter does not supply this, neither with Rest or Streaming APIs. They only provide partial results unless you pay for the "garden hose" or "firehose," both of which are very costly. Garden hose starts at about $6,000/month, currently.

osakasaul
  • 11
  • 5
0

Well, I played with it for a little bit and came up with this link format.

http://search.twitter.com/search?q=%23prayforjapan

How does that work?

Keysmack
  • 473
  • 1
  • 4
  • 8
  • I tried that one too (but only with the .json format, cause i have to get a JSON return). Didn't work for me either – Tjekkles Mar 11 '11 at 15:20
  • When I open http://search.twitter.com/search.json?q=%23prayforjapan in my browser, it seems to work. Is there a problem with your code? I'm not familiar with the framework you're using. – Keysmack Mar 11 '11 at 15:22
  • I know, it works fine in my browser too, Thats why I don't know whats wrong with it :p I'm guessing the link should be something like the first one too, like api.twitter.com/1/... – Tjekkles Mar 11 '11 at 15:29
  • Yeah, that makes sense. I don't have a Twitter API key though, so I'm not able to help you out much there. Good luck getting it figured out. – Keysmack Mar 11 '11 at 15:34