Replacing Facebook: Fb to Obsidian

---

One of my goals for 2025 is to remove my dependency on social media. I previously discussed how I was staying on top of local news and events without relying on a platform like Facebook. As a Canadian, Facebook stopped being an effective news platform after Meta decided to remove any linked content to Canadian news providers following the Online News Act (Bill C-18). This left Facebook’s function in my life as a way to stay connected to friends and contacts.

As a social network, Facebook is effectively a record of the people I’ve connected with over time. It also supports two primary ways of communicating with people in my social network. The first is one-to-many: I can make a post that other people can read, if they encounter the post in their feed. They can then comment on the post, and it can begin to foster a conversation. The fundamental problem is that one-to-many communication in this mode is entirely dependent on the algorithm’s feed. The other main mode of communication is one-to-one. With the messenger app, you can reach other people directly and exchange messages.

And yes, I know that Facebook has some other things going for it — games, marketplace, videos, community groups etc. Those are secondary features. Social connections and communication features are the primary draws.

If that’s what Facebook is supposed to do, what’s keeping me from using it?

As a recipient of one-to-many communication, it just doesn’t work. At my last count, I see at least six posts from things I do not want to see for every one post from a friend. This is too much waste to wade through and then it’s for things which are algorithmically suggested. There’s no guarantee that what appears will be what I want to see. And these odds make me less willing to put out updates for people in my life who I want to see things that are going on with me.

So, I got to thinking about what I need, and how to replace Facebook in my life. This blog post details the process, and what I’ve done to regain a bit of control over the information.

Replacing feeds

There are two ways out of feeds that I can see: for smaller clusters of people that I want to talk with or share general life updates, I use group chats. It’s free from the clutter and competition on Facebook, and facilitates just as much group communication as the post. Chat rooms and forums allow you to focus on topics or commonalities, and so I’m more engaged in Discord and Slack servers. It turns out that social media became too big and messy, and so we’ve retreated to communities where we can control the intrusive content. I think this is a win, overall.

One other option is email newsletters. While they take a bit of work, letting family and friends know where you are at in life in a less intrusive way can perform some of the work that Facebook posts do.

And one last option is this blog! It’s a place on the internet where people from my past can find me. And I think I’m going to aim for weekly link roundups. I’m loosely inspired by other link blogging practices, and it will fit nicely with my use of RSS readers. By posting my thoughts, it allows for effective one-to-many conversation to a general audience.

An alternative for keeping connections

I’ve had a Facebook account for 20 years, which makes it an interesting snapshot of my life. It spans from high school to grad school to where I’m at now. I really do appreciate that in one place, I can connect to so many people. But for a lot of the people in my friends list, we don’t really communicate much directly

I think there’s two pieces to the role that Facebook plays here: The first is that Facebook becomes a means of tracking my social history. It’s an archive of who I’ve known and when (and a way of seeing where they’re at now). THe other piece is that it becomes a functional address book. I don’t have to worry about updating it, so long as my friends keep their accounts active and running.

But what’s great is that both of these things are pretty easy to solve. For people I am actively socially connected to, I can make sure that I have some stable ways of communicating with them, and have written that down somewhere. If people want to find me, I have this website. And documenting who’s been a part of my life? Well, I work making documentation and like building automations to help build and keep it up to date.

This sounds like a project!

Getting your data from Facebook

One of the first things to note is that at any point in time, you can make a backup of the data for your Facebook account. Since I have 20 years of data, this is actually kind of large and cumbersome to deal with. To get a download, there are several steps to go through, and you’ll download what is likely a sizable zip containing all your photos and lots of advertising data.

For this project I just needed a small part of the data - the information about my contacts. You can request this in HTML or JSON, but for ease of working with the data, I went with JSON. If you are looking to explore and browse through your copy of the data, the HTML download is a good option.

The data in the contacts section is pretty minimal, with the following structure:

{
    "friends_v2": [
      {
        "name": "A Person",
        "timestamp": 1726777876
      }
    ]
}

Ok, so it’s pretty sparse. The date is a unix timestamp, which will be easy enough to handle later. But at least it’s a start for what I’m trying to recapture!

Note: If you’re not into Python, you can easily build the address book part of this using spreadsheets, the HTML export, and contacts apps. Highlight all the text from the contacts page in your HTML export, then copy and paste into Excel or Google sheets. You can use a formula and the auto-complete function to bring the dates into the same row, and VLOOKUP to merge this with your contacts export.

Planning the project

Obsidian has rapidly become one of my favorite tools for organizing notes for self-directed learning, household projects, or hobbies. The thought is it would be pretty nice to use Obsidian as a way of handling information about my friends as well. So, after looking at the data, I started to think about how I’d want this information to look in Obsidian.

I don’t want a page per Facebook contact, since the goal isn’t to recreate Facebook profile pages. So I need to filter the list of Facebook contacts to people that I want to be sure to create contact details for in an address book structure. The people that are more historical contacts will go to History pages. History pages would be groups of people with any applicable contact info that I had available.

With a plan for what the output of the script (or scripts) would be, this meant that I would need to pass through the list of contacts at least once, and add the following details to each contact: whether they’d be in the address book or social history, and what kinds of categories they would fall under. For categories, I’d aim for at least three per contact — where, when, and what kind of context I added them in. So for example, someone from highschool cross-country would get “london, highschool, cross-country” as the list of tags. This should give a fairly interesting structure to the social history pages.

I also realized that I have a wealth of contact information already available to me. As an Android user, I made regular use of my phone contacts. Ultimately, I’d love to be able to sync the data associated with my Obsidian addressbook with my phone contact list as needed. This could be a stretch goal - but the primary thing would be to merge phone contacts with Facebook friends, and output the data to useful notes in my Obsidian Vault.

Carrying this out

Originally, I was hoping it would make sense to do this as a single script. At the end of the day though, a more modular approach to this made sense. With over 500 Facebook friends, categorization would be something that I would want to pick up and come back to over a period of multiple days, so a separate command line prompt that I could terminate and come back to seemed like it’d be fine for categorization.

So I settled on four separate scripts: one to merge the contacts and save that to an intermediary JSON file, a simple command line script to prompt me to categorize and tag connections, and finally, two scripts to generate output from the intermediate JSON file.

Overall, the coding was pretty simple and straightforward: the first script merge_contacts.py takes your Facebook contacts JSON export, creates a dataframe, converts the CSV export of my Android contacts to a data frame, merges them, then dumps the resulting dataframe to JSON. The matching could be improved, but it does what it needs to do. The second script, review_contacts.py goes through the JSON file, and prompts the user to categorize each contact, providing relevant information. I set it up so the user could save and exit the script at any time using ctrl-C.

What was a bit more fun was coming up with templates for each doc. Since Obsidian allows you to enter properties for each contact, I decided to write every key from the JSON file to properties of an entry in the address book. If I wanted to, I could use templating features to update the body based on the properties, but for a test MVP, I decided to keep things simple with the Obsidian templates, and created a series of markdown tables that would correspond to groupings of contact information. For social history articles - I decided I simply wanted a list of connections that fell under that category, with key contact information (email, city, etc.) following their name if available. Ideally, the core address book would be significantly smaller.

Writing the documents to files was pretty simple. Come up with two template docs in markdown, and identify which pieces of information needed to be in both, then convert the markdown templates to f-strings, writing in variables from the data as needed. From there, it was pretty quick to write two scripts that went through the JSON entries. The first script, create_address_book.py, would generate address book entries. Any contact flagged as needing to be added to the Address Book would have a unique file created in a directory. Then it would dump key/value pairs from the JSON into YAML frontmatter for the Obsidian note. This helps with updating and merging data in the future, and can be used with Data View in Obsidian to for reporting and queries. Finally, it builds a collection of tables to provide more natural viewing for the note.

For the history pages, create_soc_history.py would load the JSON, and check to see if there were any contacts that hadn’t been processed by the review script. This prompts a user warning, encouraging them to finish the review step before proceeding with this dataset. It then generates a set of all tags entered during the review, and loops through the list of labels. For each label, it prompts the user to enter a description that would be used in the note. Finally, this script generates a file using a template, and appends contact details to the file if the contact is tagged with this label.

The test run

Using the header of the Android CSV file and the structure of the Facebook JSON, I created a test dataset that would build five contacts into a single dataset, so that I could see how data would carry through from both the Facebook side and the Android side.

Running the merge with test data, generating the desired five contacts based on two test sources
Reviewing the test data, adding tags.

I was pretty pleased with how this turned out, easily generating notes that listed contacts by label, and loading connection details into the address book. Next up is to spend some time thinking of edge-cases and ways to handle them: special characters are the number one thing I’m thinking about, but also improved matching.

Running both create scripts in my terminal, including prompts to describe tags.
Notes created for selected contacts and groups.
Obsidian view of the yaml properties for each contact.

Tagging and categorizing my Facebook friends list will be significantly more involved run, and there are some usability things that I’m going to improve before I go too much further, but I’m pretty happy with the results.

What’s next

There’s a few things to clean up: improving incrementing and spacing in the review_contacts.py script, writing tests, and actually going through the process with my own Facebook data (I did test the merge already, and have have more than 600 contacts to review). The idea got into my head too to add LinkedIn data, but I really didn’t want to review what was likely more than 1000 connections. Maybe if I continue to push ahead on this a bit. But I do want to get back to other side projects.

Running the merge with my actual data resulted in 615 contacts to review and tag.

At this stage, I’m happy with the resulting notes files. I’ll publish the project following a bit of the tidying work, in case your curious or want to do the same thing.

Things have been kind of crazy in the world lately — but working on this side project has felt good, like I’m bringing something back into my control, and it’s encouraging me to be more engaged with the people who matter to me.

Hopefully this inspires you to find ways to take more active control of your life too!