Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Lwink is a Twitter unique link tracker, expander and emitter made with node.js
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


What it does

Polls the Twitter search API for tweets with links. Expands them with HEAD and replaces tiny urls in the tweet.text with the expanded ones. Saves the links to a storage engine or in memory so that it never emits the same link twice. Only unique content!


npm install lwink


require('lwink')('node.js OR nodejs').runInterval(10000, function(links) {

Also see examples/

API Overview

var Lwink = require('lwink')

var lwink = Lwink('node.js OR nodejs')

// event emitter pattern

lwink.on('tweets', function(tweets) {
  // array of tweets

lwink.on('links', function(links) {
  // hash of links as keys - values as tweets

// running the search

// or with a callback if you don't want to use
// the evented method, tweets) {
  // links hash and tweets array, use any

// perhaps run in an interval?

// or
lwink.runInterval(ms, callback) // like above

// stop the damn thing

// options:

var lwink = Lwink('node.js OR nodejs', {
  store: storeEngine    // store engine to use. Only .get and .set are required
                        // so you can use almost any key value store
                        // defaults to an internal memory store

, translate: 'en'       // translate tweets using google api (here: english)
                        // default: no translation

, decodeEntities: true  // decode tweet html entities (requires module 'ent')
                        // default: false

, skipFirst: false      // skip first search (useful when you don't want to
                        // spam a feed on init)

MIT licenced

Something went wrong with that request. Please try again.