Giter VIP home page Giter VIP logo

streaming-timeline's Introduction

Build Status

twitter-with-socketio


Intro

Twitter Sterming Timeline Client with Node.js, Express and Socket.io for the purpose of self-learning.

Specification

This app show recent 5 tweets of your timeline with OAuth.
Notifications of new tweet, deleted tweet etc. are reflected with Socket.IO and Twitter Streaming API.

socket.io events

  • tweet(s)
    This event emits when you open timeline or there is a new tweet.

  • delete
    This event emits when there is a tweet to delete.

  • error
    This event emits when there is a error on server-side.

Getting started

For running twitter client locally, you need to export 2 vars at least.
And you have to launch redis-server on your console.

$ export TWITTER_CONSUMER_KEY='your_app_consumer_key'
$ export TWITTER_CONSUMER_SECRET='your_app_consumer_secret'
$ export COOKIE_SECRET='your_cookie_secret'
# => default:secret (option)

For running 'npm test', you need to export 3 vars.

$ export TWITTER_TOKEN_KEY='your_token_key'
$ export TWITTER_TOKEN_SECRET='your_token_secret'
$ export TWITTER_USER_ID='your_twitter_user_id'
# => your_twitter_user_id must be an id associated with your tokens.

Deployment on Heroku

If you wanna deploy this client on Heroku, you need to set 5 vars.
And you also need to install REDISTOGO add-on.

$ heroku config:set TWITTER_CONSUMER_KEY='your_app_consumer_key'
$ heroku config:set TWITTER_CONSUMER_SECRET='your_app_consumer_secret'
$ heroku config:set TWITTER_CALLBACK_URL='your_callback_url'
# => example:https://example.com/twitter_callback
$ heroku config:set COOKIE_SECRET='your_cookie_secret'
$ heroku config:set REDISTOGO_URL='your_redistogo_url'
# => example:redis://redistogo:[email protected]:9876/

streaming-timeline's People

Contributors

shirade avatar

Watchers

James Cloos avatar Satoshi Hirade avatar

streaming-timeline's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.