Giter VIP home page Giter VIP logo

docker-fb-sleep-stats's Introduction

fb-sleep-stats: Using Facebook to track your friends' sleep

Docker Pulls Docker Stars Docker Size Docker Layers Docker Tag License Travis CI Gitter Chat

Deploy to Docker Cloud Deploy to Tutum

A small tool to show the potential privacy implications modern social media have. By tracking online/offline status of people on Facebook, it is possible to get an accurate image of their sleep pattern.

Read the blog post: https://medium.com/@sqrendk/how-you-can-use-facebook-to-track-your-friends-sleeping-habits-505ace7fffb6

Facebook Sleep Screenshot

Usage

FB_USER_ID={fb_user_id} docker-compose up -d

Installation

Prerequisites

Clone repository

git clone https://github.com/sqren/fb-sleep-stats.git

Configuration

Open the source code folder:

cd fb-sleep-stats

Copy the default config file:

cp config/default.json config/development.json

Update the following values in config/development.json

Make sure there are no trailing tabs or spaces in the config file!

Install dependencies

npm install

Build browser dependencies

npm run webpack

Starting

You need to have two processes running simultaniously: the scraper and the webserver. Therefore, you must run the following two commands in separate windows/tabs.

Start scraping

This will run continously, polling Facebook every 10 minutes. Keep it running for as long as you want to track sleep.

npm run scrape

Start server

npm start

See the result in the browser: http://localhost:3000

#Troubleshooting

I get an error when running "npm run webpack"

Try re-installing the node-modules:

rm -rf node_modules
npm install
npm run webpack

No users show up

  • If you have an ad-blocker, you must disable it for the site.
  • You need to run npm run scrape and keep it running. When you stop it, it will stop tracking.

Changes to development.json are not picked up

  • You have to run npm run webpack

How do I update to the latest version?

After pulling the latest version, you must rebuild the dependencies:

git pull
rm -rf node_modules
npm install
npm run webpack

Other issues

If you encounter a bug or have a problem, please go to Issues and use the search functionality, in case someone else already asked the question. If you can't find anything helpful you are very welcome to create a new issue

Disclaimer

Facebook reached out to me and informed me, that it is against their terms to access their website by automated means. Additionally I am not allowed to urge anyone to do so. Therefore: I urge you to use this project for educational purpose only, and not use it to access Facebook.

docker-fb-sleep-stats's People

Contributors

anubisss avatar daveystruijk avatar paulloz avatar sqren avatar yongjhih avatar

Watchers

 avatar

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.