Open davidw opened 15 years ago
The Search API doesn't require authentication so I haven't worked in any support for it yet. You can just make straight up calls to the API like this:
require 'open_uri'
require 'json'
def twitter_search(query)
JSON.parse(open("http://search.twitter.com/search.format?q=#{CGI.escape(query)}").read)
end
That's a simple example, but it works. I will be adding Twitter Search support as an eventual result of #1 because I will be integrating search into my TwitterDispatch gem. Hope that helps.
This will be implemented once Grackle is integrated into TwitterAuth.
I had a dig through the code, and a number of things indicate that twitter's search methods are not supported. For instance, the base_url is https://twitter.com, whereas the search API says that it's necessary to use search.twitter.com:
http://apiwiki.twitter.com/Twitter-Search-API-Method%3A-search
Thanks, Dave