Open odykyi opened 6 years ago
It works when you pass your consumer key and access token as process envs, like this:
twitterConsumerKey=<example> twitterConsumerSecret=<example> twitterAccessToken=<example> twitterAccessTokenSecret=<example> node index.js
ok pls add this to readme
twitterConsumerKey=<example> twitterConsumerSecret=<example> twitterAccessToken=<example> twitterAccessTokenSecret=<example> node index.js
@odykyi it just worked for me, I'm not the developer of this plugin.
I know this is an old thread, but I still wanted to chip in on Craig's earlier guide...
While environment variables are okay, you only need to read the _twitterconfig file as string, and then JSON.parse it into the function as an object. Here's how I did it..
var fs = require('fs'); fs.readFile('data/twitter_config', 'utf8', function(err, contents) { var twitter = new Twitter(JSON.parse(contents)); });
Works fine.
@chiemekailo could you pls create PR and update readme with yours example thanks
Where I need to create this config? I try create
twitter_config
file in root and indata
directory its not workPlease create
example
folder in your repository with example twitter application