fenec
fenec

Reputation: 5806

ruby twitter api :uninitialized constant Twitter::HTTPAuth (NameError)

require 'rubygems'
require 'twitter'

httpauth = Twitter::HTTPAuth.new('myusername', 'mypassword')
client = Twitter::Base.new(httpauth)

It is throwing : uninitialized constant Twitter::HTTPAuth (NameError) i have "twitter" in my gem list, i dotn understand where is the problem

Upvotes: 1

Views: 1181

Answers (2)

toy
toy

Reputation: 12141

I recommend using this one. https://github.com/moomerman/twitter_oauth

It's really handy and does the job very well.

Upvotes: 1

shingara
shingara

Reputation: 46914

The HTTPAuth is delete on Twitter, so there are no more Twitter::HTTPAuth class in twitter gem.

You need use the oauth authentication now on twitter.

Upvotes: 2

Related Questions