npm

Share private packages across your team with npm Orgs, now with simplified billing via the aws marketplace!Learn more »

twitter-api-stream

0.0.2 • Public • Published

twitter-api-stream

twitter-api-stream is designed to get data from Twitter API in a very simplest way.

How to install

npm install twitter-api-stream --save

How to use

example

var Twitter = require('twitter-api-stream')
    , twitterApi = new Twitter(YOUR_CONSUMER_KEY,YOUR_CONSUMER_SECRET,YOUR_CALLBACK_URL);

twitterApi.getHomeLineTweets(userAccessToken,userRefreshToken, function (err, result) {
  if (err) {
    console.log("Error:", err);
  }
  if (result) {
    console.log("Result: ", JSON.parse(result));
  }
});

twitterApi.postTweet(userAccessToken,userRefreshToken,postText, function (err, result) {
  if (err) {
    console.log("Error:", err);
  }
  if (result) {
    console.log("Result: ", JSON.parse(result));
  }
});

twitterApi.getFollowersList(userAccessToken,userRefreshToken,postText, function (err, result) {
  if (err) {
    console.log("Error:", err);
  }
  if (result) {
    console.log("Result: ", JSON.parse(result));
  }
});

Keywords

none

install

npm i twitter-api-stream

Downloadsweekly downloads

4

version

0.0.2

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability