I've been experimenting with the Twitter API because I want to display a few lists of tweets on a special page.
Among those lists is a list with all tweets containing a specific hashtag (e.g. #test)
However I cannot find how to get that list in either XML or JSON (preferably the latter), does anyone know how? It is also fine if it can be done in TweetSharp
You can simply fetch
http://search.twitter.com/search.json?q=%23test
to get a list of tweets containing#test
in JSON, where%23test
is#test
URL encoded.I'm not familiar with TweetSharp, but I guess there must be a
search
command that you can use to search for#test
, and then transform the resulting tweets into JSON yourself.First install TweetSharp using github https://github.com/danielcrenna/tweetsharp
Here is the code to do a search
If you have more then one page results you can setup a loop and call each page
It seems like there is a change in the API since last few months. Here is the updated code:
u access with this url for your tweet searchs. But u have to use OAuth protocols.
https://api.twitter.com/1.1/search/tweets.json?q=%40twitterapi
I struggled with the same problem. Here is my vague solution . Enjoy Programming. It will get out of the function whenever your required number of tweets are acquired/fetched.
}