Search code examples
twitterhashtagtweets

twitter hashtag search


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!


Solution

  • 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?