You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pls correct readme because twitter_config not work #66
ok pls add this to readme twitterConsumerKey=<example> twitterConsumerSecret=<example> twitterAccessToken=<example> twitterAccessTokenSecret=<example> node index.js
Reacted by David Leal, Francisco Pinzón, Norberto Esteves and odykyi
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 twitter_config 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));
});
Activity
davidvexel commentedon Oct 20, 2017
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.jsodykyi commentedon Oct 28, 2017
ok pls add this to readme
twitterConsumerKey=<example> twitterConsumerSecret=<example> twitterAccessToken=<example> twitterAccessTokenSecret=<example> node index.jsdavidvexel commentedon Oct 29, 2017
@odykyi it just worked for me, I'm not the developer of this plugin.
chiemekailo commentedon Nov 22, 2018
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 twitter_config file as string, and then JSON.parse it into the function as an object.
Here's how I did it..
Works fine.
odykyi commentedon Nov 23, 2018
@chiemekailo could you pls create PR and update readme with yours example
thanks