Skip to content

A small demo with SailsJS for LyonJS meetup. Aggregate tweets from twitter Stream API with tracking tag.

License

Notifications You must be signed in to change notification settings

mehdibeldjilali/lyonjs-sails-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lyonjs-demo

a Sails application made for LyonJS demo.

You just have to do npm install in the repository in order to get all dependencies. You must have last node version (5.10.0) and latest npm version (npm install -g npm@latest) in order to avoid some dependencies bugs.

Inside the repository there are two things to configure : your twitter application keys and the tags to track.

First one is inside config/twitter.js, just change the following:

module.exports.twitter = {
    consumer_key: 'xxxxx',
    consumer_secret: 'xxxxx',
    access_token_key: 'xxxxx',
    access_token_secret: 'xxxxx'
};

The second is inside api/controllers/TweetController.js, just change '#lyonjs' tag by whatever tags you want to track :

// Set a stream listener for tweets matching tracking keywords
twitterClient.stream('statuses/filter', {
	track: '#lyonjs' --> here : e.g: '#test,lyonjs,games' etc
}, function(stream) {
	streamTweets(stream, Tweet, sails);
	console.log("tweets stream: ", stream);
});

About

A small demo with SailsJS for LyonJS meetup. Aggregate tweets from twitter Stream API with tracking tag.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 74.2%
  • HTML 25.0%
  • CSS 0.8%