#Facebook Messenger Analyzer
Download, Parse, and Analyze
This project consists of a few parts / 'modules'
- Scraper (node.js) that downloads facebook messages into MySQL
- Analyzer (node) that does data processing, storing intermediary values in redis
- Web (React.js) that displays data nicely
The Scraper code can work on its own if desired.
##Howto run the scraper
- Node & Yarn
- MySQL, with utf8mb4 support
- Redis
- clone, cd into project repo,
yarn install
cp .env.example .env
, add your own credentials for Facebook and MySQLnode auth.js
to auth with facebook and save the state inappstate.json
(only need to do this once until the cookies expire)- Scroll down to the end of scraper.js and run your code from within login method!
#TODO
- make script automatically download all your threads in a loop
- add support for other metadata (changing emoji/color/title) -requires tweaking facebook-chat-api
- stop downloading a thread when there are back to back sql duplicate errors, this can be a hacky way of getting a delta update of a thread since the last time we downloaded it
- chat titles for 1:1 convos are blank, so maybe have a script hint them based on fbid->name lookup and update that title value for 1:1 threads