twitter-timeline-middleware

0.0.1 • Public • Published

twitter-timeline-middleware

What is it?

A quick and easy way to generate an endpoint that serves twitter timeline data for a given user.

How do I use it?

First, you'll need Twitter developer credentials. These can be generated here. This library only requires READ permissions, so adjust your app's permissions accordingly.

Next, you'll need to install the package:

npm install twitter-timeline-middleware

And then configure and use the middleware in your app:

var twitterTimeline = require('twitter-timeline-middleware');
var twitterCredentials = {
  consumerKey: 'abcdefg',
  consumerSecret: 'hijklmn',
  accessTokenKey: 'opqrst',
  accessTokenSecret: 'uvwxyz'
};
 
app.use('/timeline/:screen_name', twitterTimeline(twitterCredentials));

Response

{
  "data": <Twitter Server Response>
}

install

npm i twitter-timeline-middleware

Downloadsweekly downloads

0

version

0.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability