Skip to content

delighttechnology/facebook-messenger-word-cloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Facebook Messenger Word Cloud

Create Facebook Messenger Word Cloud based on the messeges exported from Facebook archive. Script extracts messages from one or multiple message_x.HTML files for a selected folder and transform into .PNG (Word Cloud) and .CSV (descending words list) containing most frequently used words. If you don't have any of the imported library, you can easily install them by coping the comment from the begining of the script pip install XXX. Generating a word cloud from a JSON file would probably be much simpler however, not everyone downloads this file as an archive at the first place and it wouldn't be such a challenge.

Table of contents

Example Usage

Generate rectangular word cloud just providing the folder path containing the .html files:

fb_word_cloud.py -p C:\fb\messages\inbox\username_xzdsmlmbaiw\

Generate rectangular Word Cloud without specified words:

fb_word_cloud.py -p C:\fb\messages\inbox\username\ -e a,in,an,or,and,how,why 

Generate Word Cloud in different shapes (see Custom shape ) without specified words :

fb_word_cloud.py -p C:\fb\messages\inbox\username\ -e a,in,an,or,and,how,why -i C:\Users\Desktop\like.jpg

Custom shape

In order to create Word Cloud in various shapes, mask need to be provided in in a certain way. Script accepts only files with .jpg, .jpeg and .png extensions. Additionally, file need to have black #000000 shape and white #FFFFFF background. For .png files background can be transparent.

   

Downloading messages files

If you don't know how to download facebook archive, below you can find step by step manual.

  1. Click on you profile picture and select Setting & PrivacySettings


  1. On the left side of the screen click Privacy tab and then Your Facebook information

  ⮕  


  1. You will have a list of options to choose from, please select Download profile information


  1. Here you can request a download of your facebook archive. It can contain all the information that Facebook has collected so far. We only need a message, so I checked only this option with low resolution images. Remember to select HTML format as below. Confirm your choices and wait until Facebook will generate files to download. It could take even 24h so be patient.


Extracting files

After you download all the files created by Facebook, extract them to one folder. If your file archiver software recognise the same names in folders, just select "Rename All".

Ultimately, you should end up with following files when looking into selected person directory (eg.: ..\messages\inbox\username_xzdsmlmbaiw\)

License

Copyright © 2022, Andrzej Strzala.

About

Create messenger word cloud based on the exported Facebook HTML archive.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages