Skip to content

Instantly share code, notes, and snippets.

@erichurst
Created January 9, 2010 23:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save erichurst/273200 to your computer and use it in GitHub Desktop.
Save erichurst/273200 to your computer and use it in GitHub Desktop.
require 'twitter'
Twitter::Search.new.geocode(39.037, -94.5874, '5mi').fetch().results
#=> all tweets within 5 miles of lat/lon
Twitter::Search.geocode(39.037, -94.5874, '5mi').fetch().results.first
#=> most recent tweet within 5 miles of lat/lon
Twitter::Search.new('dinner').geocode(39.037, -94.5874, '5mi').fetch().results
#=> all tweets containing the word 'dinner' within 5 miles of lat/lon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment