voronianski / node-tweet-cli

Start making tweets from your bash, zsh, whatever!
http://pixelhunter.me/post/66092531636/tweeting-command-line-application-with-flatiron-js
81 stars 17 forks source link

Unable to authenticate behind proxy #5

Open nevalsar opened 10 years ago

nevalsar commented 10 years ago

I installed via NPM and on using tweet login I'm faced with this:

> tweet login
info:    Start sending request to https://twitter.com
error:   Error while executing command!

I'm using zsh on a Linux system behind an http proxy server with environment variables http_proxy https_proxy set. Are proxies supported at the moment or does it require any particular environment variables to be set?

voronianski commented 10 years ago

@routeaccess there could be a trouble with Twitter API itself but not with the module.

aogilvie commented 9 years ago

I also have this problem with CentOS and proxy.

You should use 'request' which supports better handling of environment vars in common/auth.js

There is a good example using Twitter on their README -> https://github.com/request/request

// OAuth1.0 - 3-legged server side flow (Twitter example)
// step 1
var qs = require('querystring')
  , oauth =
    { callback: 'http://mysite.com/callback/'
    , consumer_key: CONSUMER_KEY
    , consumer_secret: CONSUMER_SECRET
    }
  , url = 'https://api.twitter.com/oauth/request_token'
  ;
request.post({url:url, oauth:oauth}, function (e, r, body) {
voronianski commented 8 years ago

@aogilvie @nevinvalsaraj any workarounds?

aogilvie commented 8 years ago

@voronianski I used a different cli twitter client in the end.