raise_rest_error': Bad Request (Twitter::RESTError)

10 views
Skip to first unread message

webrunner

unread,
Jul 2, 2010, 8:25:46 AM7/2/10
to twitter4r-users
Hi

I got the following error from my ruby script:


/Users/helmutsins/.rvm/gems/ruby-1.8.6-p399/gems/mbbx6spp-
twitter4r-0.4.0/lib/twitter/client/base.rb:43:in `raise_rest_error':
Unauthorized (Twitter::RESTError)
from /Users/helmutsins/.rvm/gems/ruby-1.8.6-p399/gems/mbbx6spp-
twitter4r-0.4.0/lib/twitter/client/base.rb:48:in
`handle_rest_response'
from /Users/helmutsins/.rvm/gems/ruby-1.8.6-p399/gems/mbbx6spp-
twitter4r-0.4.0/lib/twitter/client/base.rb:20:in `http_connect'
from /Users/helmutsins/.rvm/rubies/ruby-1.8.6-p399/lib/ruby/1.8/net/
http.rb:543:in `start'
from /Users/helmutsins/.rvm/gems/ruby-1.8.6-p399/gems/mbbx6spp-
twitter4r-0.4.0/lib/twitter/client/base.rb:16:in `http_connect'
from /Users/helmutsins/.rvm/gems/ruby-1.8.6-p399/gems/mbbx6spp-
twitter4r-0.4.0/lib/twitter/client/messaging.rb:23:in `messages'
from ./twitter_pt.rb:17

Here is the source code:


#!/usr/bin/env ruby

require('rubygems')
gem('mbbx6spp-twitter4r')
require('twitter')

Twitter::Client.configure do | conf |
conf.proxy_host = 'proxy.xxxx.de'
conf.proxy_port = 8080
conf.proxy_user = 'xxxxx'
conf.proxy_pass = 'xxxx'
end

twitter = Twitter::Client.new(:login => 'flighttest', :password =>
'xxxxx')

received_messages = twitter.messages(:received)
puts "Number of messages #{received_messages.length}"

What´s wrong? Can you help me?

Best regards

webrunner
Reply all
Reply to author
Forward
0 new messages