Tiny Twitter API proxy server
Allows you to make requests to the Twitter API from the comfort of your browser.
Install
npm install -g twitter-proxy
Getting started
-
Create an app on https://dev.twitter.com – the URLs and name don't matter, you won't be using it to authenticate people
-
Create a json configuration file, containing your consumer key and secret:
{
"consumerKey": "<paste consumer key here>",
"consumerSecret": "<paste consumer secret here>"
}
-
Let's say we save it on ~/config.json
-
Run the app using the saved config:
$ twitter-proxy ~/config.json
You can now make requests to Twitter API URLs, but to http://localhost:7890, from your browser.
Programmatic API
From your node app, just require this module as a function and call it using the config object as the only parameter:
var twitterProxyServer = require('twitter-proxy');
twitterProxyServer({
consumerKey: '<paste consumer key here>',
consumerSecret: '<paste consumer secret here>'
});
Configuration
The possible configuration properties, and its default values are:
{
"consumerKey": "",
"consumerSecret": "",
"accessToken": "",
"accessTokenSecret": "",
"port": "7890"
}
License
MIT License