Seach tweets with geocode Twitter gem

ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-darwin10.8.0]
gem twitter (4.4.1, 3.7.0)

the gem is this.

What I am trying to do is simply to search tweets from geocode.

@client =
:consumer_key => CONSUMER_KEY,
:consumer_secret => CONSUMER_SECRET,
:oauth_token => OAUTH_TOKEN,
:oauth_token_secret => OAUTH_TOKEN_SECRET

longitude = 140.3863
latitude = 35.76472
str = latitude.to_s + ‘,’ + longitude.to_s + ‘, 10km’

p => str ).results

gives an error

on_complete': Could not authenticate you (Twitter::Error::Unauthorized) from /Users/soichi/.rvm/gems/ruby-1.9.3-p286/gems/faraday-0.8.4/lib/faraday/response.rb:9:inblock in call’

But the authentication should be fine because I have tried user_timeline
and got the results as expected.

Do you see the problem in my code?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs