Skip to content

A simple app using websockets to push notifications of Twitter posts to a Firefox OS device

Notifications You must be signed in to change notification settings

vladikoff/fxos-websockets-notifications-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Firefox OS #Hashtag Watcher

This is an example of FireFox OS push notifications via websockets using Node.js with the socket.io and nTwitter modules. The server waits for tweets with specific keywords (using the Twitter streaming API) and pushes them to the client through websockets.

The "client" module is the FireFox OS app with a manifest.webapp file which can be installed on phones running FireFox OS or in the Firefox OS simulator add-on for Firefox. The app will make a websocket connection to the "server" and will then display the tweets received through that connection as notifications.

This was a prototype/hack for the BrazilJS 2013 conference.

Based on earlier work in firefox_os_websocket_notification by Mehdi Mollaverdi.

How to install

Run the server

Create a twitterCredentials.js file with the following content in the "server" directory:

var credentials = {
  consumer_key: 'Your twitter consumer key',
  consumer_secret: 'Your twitter consumer secret',
  access_token_key: 'Your twitter access token key',
  access_token_secret: 'Your twitter access token secret'
};

module.exports = credentials;

Twitter keys can be acquired from dev.twitter.com/apps.

Then, from the "server" directory, run npm install to install the dependencies and at the end, run node app.js.

Try the app on FireFox OS simulator

Add the "manifest.webapp" file in the "client" directory to the simulator dashboard.

About

A simple app using websockets to push notifications of Twitter posts to a Firefox OS device

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 88.9%
  • CSS 11.1%