Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for search? #7

Open
davidw opened this issue Apr 22, 2009 · 2 comments
Open

Support for search? #7

davidw opened this issue Apr 22, 2009 · 2 comments
Labels

Comments

@davidw
Copy link

davidw commented Apr 22, 2009

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

@mbleigh
Copy link
Owner

mbleigh commented Apr 23, 2009

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.

@mbleigh
Copy link
Owner

mbleigh commented May 8, 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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants