Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marklit/2803089 to your computer and use it in GitHub Desktop.
Save marklit/2803089 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