tweet-bliss

Twitter API 1.1 simplified client for streaming and tweeting

npm install tweet-bliss
12 downloads in the last week
21 downloads in the last month

Twitter tweets to command arguments

[tweet-bliss] Aims to provide a simplified, asynchronous client by providing only the basic uses and abstracting away the complexity of the entire API

  • Uses version 1.1 of Twitter's REST and Streaming APIs

  • See examples directory for example usage

Install

npm install tweet-bliss

Requirements

You can install tweet-bliss and its dependencies with npm: npm install tweet-bliss.

Getting started

  1. Head over to https://dev.twitter.com/ and create an account and an app.

  2. On your app page click settings and set application type to Read, Write and Access direct messages

  3. Create access token

  4. On the OAuth tool tab you can view your keys and secrets for use below

Setup API (stable)

var bliss = require('tweet-bliss').createClient({
    consumer_key: 'XXXXXXXXXXXXXXXXXXXXXX',
    consumer_secret: 'XXXXXXXXXXXXXXXXXXXXXX',
    access_token_key: 'XXXXXXXXXXXXXXXXXXXXXX',
    access_token_secret: 'XXXXXXXXXXXXXXXXXXXXXX'
});

Basic Streaming tweets by keyword

bliss.stream('#add', function(fromUserName, tweetText){
    //handle tweets that contain #add
});

Basic tweeting

bliss.composeTweet(tweetText, function(err){
    //tweet has been sent
});

Contributors

npm loves you