Giter Site home page Giter Site logo

gibix / facebook Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tracking-exposed/facebook

0.0 2.0 0.0 14.1 MB

facebook.tracking.exposed - see, investigate, share your filter bubble

Home Page: https://facebook.tracking.exposed

License: GNU General Public License v3.0

JavaScript 60.05% Shell 0.48% HTML 37.15% CSS 2.32%

facebook's Introduction

Facebook.Tracking.Exposed

Take a look at the website, install the chrome the chrome extension or drop a comment in HW.

Todo List

  • improve the docs

Contribute

  • Look at how to run it locally
  • Write a parser
  • Write web interfaces
  • Design new analysis
  • More? It's open! just fork it!

Architecture

The project is designed to serve open data and distributed analysis of the data obtained from the users.

  • The server stores the user's data that receives raw from the extension.
  • The parsers extract metadata from the html snippets, some parsers are executed on the server (here) or remotely trough parser api.
  • The data are exposed through api and web interfaces like reality check and reality meter.

Api

Endpoint: https://facebook.tracking.exposed/api/v1

Get available HTML snippet

POST /snippet/status

{
  "since": "<ISO8601 DateTime>",
  "until": "<ISO8601 DateTime>",
  "parserName": "<string>",
  "requirements": "<object>"
}

For example, if your parser is analyzing promoted posts, received in the last 48 hours:

{
  "requirements": { "postType" : true, Type:"feed" },
  "since": "2016-11-08T21:15:13.511Z",
  "until": "2016-11-10T21:15:13.516Z",
  "parserName": "postType",
}

The server checks the stored HTML pieces in the requested time range and answers:

{
  "available": "<Int>",
  "limit": "<Int>"
}

The server checks the stored HTML pieces in the requested time range. It then returns the number of available HTML snippets that do not yet have a key named parserName, and the maximum amount of HTML snippets that would be returned when the endpoint content (below) is invoked.

Get HTML snippet

POST /snippet/content

Request:

{
  "since": "<ISO8601 DateTime>",
  "until": "<ISO8601 DateTime>",
  "parserName": "<string>",
  "requirements": "<object>"
}

The request is the same as the previous.

Answer:

[
  {
    "html": "<html snippet>",
    "metadata-1": "<value>",
    "metadata-2": "<value>",
    "snippetId": "<hash of html snippet>"
    },
],

is a list of objects, each one containing the HTML section, the id, writingTime, and the previously added metadata.

Run it locally

You need to have mongodb on your machine in order to run the full project.

$ sudo apt-get install mongodb
$ npm install
$ npm run build
$ npm run watch

At this point you should able to find your local version on your localhost address (port 8000).

Your server is empty, don't expect that connecting at localhost will show you something. You might mirror the public section of the database (TODO) and use it ad working data to develop new API/visualisation

Debug mode

DEBUG=* node app

Docker support

First, you need to install a mongodb docker image and run it as the basic dataset of your installation:

$ docker run -d --name mongo mongo
$ docker run -d --name fbtrex -p 8000:8000 --link mongo:mongo fbtrex/fbtrex-app

facebook's People

Contributors

bebsy avatar davinerd avatar digitigrafo avatar endorama avatar fievelk avatar micheleb avatar mitch90 avatar nolash avatar raimondiand avatar vecna avatar vrde avatar

Watchers

 avatar  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.