var TwitterFeed = new (require('twitterfeed'))({
searchString: '@NodePhilly OR #nodephilly OR #nodejs', // https://dev.twitter.com/docs/using-search
filterString: 'nodephilly,nodejs', // https://dev.twitter.com/docs/streaming-apis/parameters#track
cacheLimit: 3 // cycle tweets out of cache after limit is reached
});
var feed = TwitterFeed.start();
feed.on('tweet', function(tweet) {
console.log('TWEET :: %s', JSON.stringify(tweet));
});
feed.on('error', function(error) {
console.log('ERROR :: %s', JSON.stringify(error));
});
function printCachedTweets() {
feed.getCachedTweets().forEach(function(tweet) {
console.log('CACHED TWEET :: %s', JSON.stringify(tweet));
});
};
setTimeout(printCachedTweets, 3000);
This repository has been archived by the owner on Dec 31, 2019. It is now read-only.
timsavery/twitterfeed
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Simple abstraction on top of ntwitter for working with a website feed.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published