- Download your Facebook messenger history from your Facebook settings. More here.
- Unzip your data into the directory of your choice.
- Identify a person whose chat history you want to analyze.
- Find the JSON file listing all of their messages with you (named after their username).
- We will refer to this file's path as ${FILE}.
- Clone this repository and change directory into it.
git clone https://github.com/dmhacker/facebook-message-analysis && cd facebook-message-analysis
- Install any dependencies.
pip install -r requirements.txt
- If you get an NTLK download error, use this command to resolve the issue. It will tell NTLK to download the appropriate stopwords file.
python
>>> import nltk
>>> nltk.download('stopwords')
>>> quit()
- Run the analyzer.
python fbmessages ${FILE}
In a few seconds, you should get some nice visualizations. Have fun!