Skip to content
This repository

Support for search? #7

Open
davidw opened this Issue April 22, 2009 · 2 comments

2 participants

David N. Welton Michael Bleigh
David N. Welton

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

Michael Bleigh
Owner

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.

Michael Bleigh
Owner
mbleigh commented May 08, 2009

This will be implemented once Grackle is integrated into TwitterAuth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.