OAuth Twitter Implementation for Node.js using EJS in Express.js
Caution : This example is just to have an idea of twitter oauth implementaion and also how to render ejs in Express.js. It will be very useful for beginner as well.
Change config.js configuration elements that also includes
- Twitter Consumer Key
- Twitter Consumer Secret
Install dependencies used here with npm
npm install oauth
npm install request
npm install qs
npm install express
npm install ejs
That's all the setup you need. Phew. Now you can boot the app:
node Config.js
Now, if you open http://127.0.0.1:3000 you'll see the default express page with different options. Click on "connect" link to authenticate twitter, once its done "Universe is yours" !