Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js Twitter Client

Is there a twitter client for node.js (not the streaming API, the regular API)?

I already know about twitter-node but I'm looking for a more generic client that allows use of the Twitter REST API.

Anyone have any ideas?

Thanks,

Johnathan

like image 249
Johnathan Leppert Avatar asked Jun 16 '11 19:06

Johnathan Leppert


People also ask

Does Twitter use node JS?

To the average Twitter user that probably doesn't come as a surprise. Twitter is incredibly easy to automate, in fact, today I'm going to show you just how easy it is to use the Twitter API with NodeJS to read, search, and post tweets.

How do I create a Twitter client?

1) Go to apps.twitter.com and click on Sign In in the top right. Log in using your personal Twitter credentials. 3) Fill out the top three “required” fields and check the box next to “Yes, I agree” to accept the developer agreement. Click the button “Create you Twitter application”.

How do I stream a Twitter feed?

Tap the camera icon when you go to compose a Tweet and swipe right to "LIVE" to start a live video. You can type in "What's Happening?" to include a Tweet with your video, and tap "Go LIVE" when you're ready.


2 Answers

Check out my node module, it is probably what you're looking for. Has full twitter API support (REST & Streaming API): https://github.com/ttezel/twit

like image 90
tez Avatar answered Sep 17 '22 14:09

tez


2014 Update

A lot has changed since this question was asked over 3 years ago, but this question is still highly ranked on search engines so it's time to add some updates.

There are many different Node modules to use with the Twitter API and it is not easy to choose the right one for someone who doesn't know all of them. Below is a short description of all of the currently popular modules, together with their authors, latest version, how many stars on GitHub do they have (which is a good indication of their popularity among GitHub users), how many commits, how many contributors, where were they recommended etc. There are also some useful usage stats on npm.

Since it is about Twitter, I will link to the Twitter profiles of people that I reference. The data is up to date as of 2014-07-29 and isn't meant to be always up to date but rather to show a snapshot in time for various comparisons.

On the official dev.twitter.com/docs/twitter-libraries there are only two Node modules:

TwitterJSClient by @BoyCook

  • (Version 0.0.1, 87★, 2 contributors, 19 commits - last on May 06, 2014) (not available on npm?)

user-stream by @AivisSilins

  • (Version 0.0.7, 57★, 1 contributor, 26 commits - last on Mar 28, 2014) (npm stats)

The articles:

  • Node.js modules you should know about: ntwitter posted on December 09, 2011 by @pkrumins
  • Node.js + Twitter Streaming API + Socket.io = Twitter Cashtag Heatmap posted on April 18, 2013 by @thedillonb

both recommend:

ntwitter by AvianFlu (no Twitter?) et al.

  • (Version 0.5.0, 765★, 31 contributors, 245 commits - last on Sep 14, 2012) (npm stats)

The article A Twitter bot in 20 minutes with Node.js posted on October 3rd, 2013 by @ebertx recommends:

twit by @tolga_tezel

  • (Version 1.1.18, 806★, 11 contributors, 296 commits - last on Jul 21, 2014) (npm stats)

The most popular Twitter modules according to nodejsmodules.org by @corruptmem are:

(listing only the relevant ones from the list - eg. skipping blueimp-bootstrap-image-gallery etc.)

everyauth by @briannoguchi

  • (Version 0.4.6, 2822★, 47 contributors, 760 commits - last on Apr 30, 2014) (npm stats)
  • (Note: it's a general-purpose authentication module)

ntwitter by AvianFlu (no Twitter?) et al.

  • (see above)

twitter-node by @technoweenie

  • (Version 0.1.1, 436★, 10 contributors, 65 commits - last on Apr 15, 2012) (npm stats)
  • (Note: Discontinued and recommends ntwitter)

node-twitter by @jdub

  • (forked from twitter-node - see above)
  • (on npm called just "twitter")
  • (Version 0.1.18, 313★, 9 contributors, 162 commits - last on Mar 10, 2012) (npm stats)

twitterlib by @rem

  • (Version 1.1.4, 289★, 3 contributors, 89 commits - last on Jun 21, 2013) (npm stats)

twit by @tolga_tezel

  • (see above)

This is what I have found to be a list of most popular Node modules to use the Twitter API. Please note that the most popular doesn't necessarily mean the best. All of them have different APIs, popularity, feature sets, authors, documentation, users. It's impossible to recommend only one module but this list should be a good starting point to find the one that is best suited for a particular set of needs.

Please comment if there are any mistakes or missing modules or other info that should be added here.

like image 44
rsp Avatar answered Sep 17 '22 14:09

rsp