I am trying to access the Twitter API Users lookup endpoint. (
https://dev.twitter.com/docs/api/1.1/get/users/lookup )
I have code in my rails app as:
client = Grackle::Client.new(:auth=> { :type=>:oauth, :consumer_key=>@@APP_CONFIG['api']['twitter']['consumer_key'], :consumer_secret=> @@APP_CONFIG['api']['twitter']['consumer_secret'] })
client.users.lookup! :screen_name => "google,youtube"
To which I get the following error:
Grackle::TwitterError: post http://api.twitter.com/1.1/users/lookup.json => 400: {"errors":[{"message":"Bad Authentication data","code":215}]}
from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/grackle-0.3.0/lib/grackle/client.rb:296:in `handle_error_response'
from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/grackle-0.3.0/lib/grackle/client.rb:274:in `process_response'
from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/grackle-0.3.0/lib/grackle/client.rb:248:in `call_with_format'
from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/grackle-0.3.0/lib/grackle/client.rb:228:in `append'
from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/grackle-0.3.0/lib/grackle/client.rb:166:in `method_missing'
from /Users/myth/Work/Rails Development/2020Social/socialindex/app/models/twitter.rb:18:in `fetch_api_data'
from (irb):1
from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.12/lib/rails/commands/console.rb:47:in `start'
from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.12/lib/rails/commands/console.rb:8:in `start'
from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.12/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'