Import Facebook Posts/Media to Ghost

Hello.

My wife is wanting to move off of Facebook and I am setting up a Ghost site for her. She would like to bring her Facebook posts, images and videos along with her. I have looked high and low for information about importing/migrating content from Facebook to Ghost, but there seems to be no tooling available.

Surely others have done this — it’s pretty straight-forward to export a zip file containing all your posts and media from facebook.

Does such tooling exist?

If not, I’m perfectly willing to write a tool to do so.

However, the Ghost documentation on constructing migration tools is . . . well, slim. Not much more than “construct a suitable JSON file from the data you have”. Description of the JSON file required by the importer is next to non-existent.

Are there formal schemata that describe the contents of this file?

Suggestions about how best to proceed, or links to tools/code that someone has written to do this would be appreciated.

Agreed the documentation is pretty scant but it is fairly straightforward to write an importer. I’m working on my own in Python for Tumblr – others do exist but aren’t suitable for what I have, which is a local export, similar to yours.

The basic approach is to identify the elements within a post and create the HTML for this that Ghost uses. This is then embedded within the JSON for a post along with the rest of the metadata. Text is pretty easy, images need a little more work but you can rely on copying the image files into Ghost’s file system. Videos are trickier as it seems that Ghost needs some additional metadata.