** THIS CODEBASE IS DEAD!! **
This code was written to do a one-off import of old Facebook and Instagram posts into a standardized format stored locally.
That import has already happened, and so there should be no further need to use this code.
Any future interactions with Instagram/Facebook would go in the other direction -- rather than posting there and then importing those posts locally... instead we'll be making a local post and then EXPORTING it to Instagram and Facebook.
Old information is below
This codebase aims to "import" historical social media posts from Meta platforms.
Basically, I want to preserve my posts from those platforms permanently, so that I'm not dependent on them for storage and I can leave whenever I want.
Meta does allow you to download (some of) the things you've posted. These are downloadable in an inconvenient format.
This code's job is to pick out all of the useful data from that download, and store it locally in a more convenient format. Well, at least it's more conveinient for me. YMMV. The code will also "deduplicate" -- if the same post appears on Facebook and Instagram, it retains only Facebook's copy.
This code is kinda hacky and bodged together. This is fine since it's only really intended to be used once -- to import all previously-posted items. In future, I plan to make posts locally first, and then copy them to Meta platforms. So, there should be no need to do any future imports.
The import can be done like this:
- Download your data from Facebook and Instagram as zip files
- Make a scratch directory, and unzip both zip files there.
- Facebook's should go in a subdirectory named
facebook-download - Instagram's should be
instagram-download
- Facebook's should go in a subdirectory named
- Modify the
BASE_DIRvariable inmeta_importer.pyto point to your scratch directory - Set up and activate Python virtual environment. Something like this:
cd /path/to/this/codevirtualenv -p $(which python3) venvsource venv/bin/activate
- Install this project's dependencies:
pip install -r requirements.txt - Run the importer code:
python main.py - All of your posts will be stored in a directory tree named
testat the same level as this readme file.