项目作者: nishantdania

项目描述 :
Demo twitter bot from Mastering Nodejs book
高级语言: JavaScript
项目地址: git://github.com/nishantdania/mastering-nodejs-twitter-bot.git


Mastering Nodejs Twitter Bot

Code for the twitter bot example from the book Mastering Node.js

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Running the app

Create a .env file in the root of the project and add the following to the file :

  1. CONSUMER_KEY=<YOUR_CONSUMER_KEY>
  2. CONSUMER_SECRET=<YOUR_CONSUMER_SECRET>
  3. ACCESS_TOKEN=<YOUR_ACCESS_TOKEN>
  4. ACCESS_TOKEN_SECRET=<YOUR_ACCESS_TOKEN_SECRET>

To generate these keys, create a new developer app in Twitter at Twitter Developer App

Install the dependencies by running npm install in the root of the project.

Open 2 terminal windows and run the following processes:

node server.js

node twitter.js

Open the index.html in the browser to see the tweets being pulled.