def try_auth
if config.user_name.empty? || config.password.empty?
puts 'Please enter your Twitter login:'
end
ui = create_highline
if config.user_name.empty?
config.user_name = ui.ask('Username: ')
else
puts "Username: #{config.user_name}"
end
if config.password.empty?
config.password = ui.ask('Password: ') { |q| q.echo = false}
end
twitter = RubytterProxy.new(config.user_name, config.password, twitter_option)
begin
twitter.verify_credentials
return twitter
rescue Rubytter::APIError
config.__clear__(:password)
end
return nil
end