Exploiting Facebook Open Graph to Email Your Facebook Followers

I’ve been testing out a ton of different ways to target people through Facebook’s advertising platform recently. During my testing, I got a little sidetracked and started looking at ways to not only email your own Facebook followers, but also the followers of your competitors.

Email your Facebook followers

Sound good?

…I thought so. Let’s get started then.

Extracting the UIDs of Your Followers

Everyone that has a Facebook profile will have a unique user ID (UID). This is a numerical ID code that is used by Facebook to identify each user profile (along with a few other pieces of data). If you’ve spent a lot of time using Facebook advertising, then you’ll probably be fairly familiar with UIDs.

Facebook Open Graph

To be able to gather any extra information about your followers, you’ll need each of their UIDs. Unfortunately, Facebook doesn’t make acquiring this information easy for you. In fact, they actively make it tough so that sneaky little marketers like me can’t use the UIDs to target users in a way that doesn’t use their own targeting and segmenting options (which aren’t great).

In order to extract these UIDs, you’ll need to use a tool called Facebook ID Scraper (Note: I have no affiliation with this tool whatsoever). The tool costs $50, but you can use it under its free license for up to 500 UIDs.

There have been a number of tools like this that keep getting shut down by Facebook, but this tool seems to have stuck around the longest (new ones keep popping up all the time, though). I actually mentioned a tool called Social Lead Fox previously that did this job; however, this tool no longer works now.

Anyway, once you’ve got the tool up and running, you can search for your Facebook page using the search tool and export all of the UIDs to a .csv file. It’s really simple.

Facebook ID Scraper

Scraping the Facebook Email Addresses

Now that you’ve extracted all of your Facebook followers’ UIDs, it’s time to gather their email addresses (this is where it gets interesting).

To carry out the next step, you’ll need the SEO Tools plugin for Excel (which is free). If you’ve never used it before, then you’re seriously missing out! I recorded a full video tutorial on using the tool here as well.

Once installed, open up your spreadsheet with all the Facebook UIDs within it. In the column to the right of all the UID values, you’ll want to add the following formula:

="http://graph.facebook.com/"&A1

This will parse together the Facebook UID into the Facebook Graph URL. The result should look something like this:

http://graph.facebook.com/1050799186

Now, apply this to all of the cells in the column.

Facebook Graph UIDs

You’ll notice that if you visit one of these URLs, you’ll see all of the publically visible Open Graph data around each person. This looks something like this:

{
   "id": "1050799186",
   "first_name": "Peggy",
   "gender": "female",
   "last_name": "Chan",
   "link": "https://www.facebook.com/yummycheesecake",
   "locale": "en_US",
   "name": "Peggy Chan",
   "username": "yummycheesecake"
}

Using some simple JSON code, any of this data can be easily extracted for each Facebook user. This includes their full name, location, gender and username. You’ll notice that the email address isn’t included here, though.

Don’t worry, as every Facebook email address is made up of the Facebook username followed by @facebook.com. So all we need to do is extract the username of each user and parse it with the @facebook.com suffix. Simple!

Well, it is if you know how…

All that you need to do is write the following formula in column C of your spreadsheet:

=JsonPathOnUrl(B1, "username")

Once you press enter, the SEO Tools plugin will work its magic and return the username of the profile. Now, you just need to apply this to all cells in the column and wait a few minutes for all the values to be processed.

Scraping Facebook Usernames

Finally, in Colum D, add the following simple formula to parse the username into a full email address:

=C1&"@facebook.com"

Once you apply this to all of the cells in the columns, you’ll have a nice, long list of emails.

As an added bonus, you could grab the full names of all the profiles you’ve gathered, which is perfect if you want to personalise your emails.

Gathering Facebook Email Addresses

All you need to do is add the following formula to column E:

=JsonPathOnUrl(B1, "first_name")

That will grab the first name of all your followers (you just need to apply the formula to all cells in the column). Then, you can do the same for their last names by adding the following formula to column F:

=JsonPathOnUrl(B1, "last_name")

Facebook Profile Names

Using Facebook Email Addresses

You’re probably wondering what these Facebook email addresses are used for. Well, they were previously used to send direct messages to your Facebook profile, but Facebook recently scrapped that. Now, any email sent directly to your Facebook email address will go directly to the primary personal email address on your account.

That’s right – their personal email.

But just hold on a second. Before you go and blast out a message to all of your followers’ email addresses, you’ll want to know a few things first:

  1. For some reason, you can’t send emails from Microsoft Outlook to @facebook.com email addresses. I have no idea why, but this is just what I’ve found from my testing. You can, however, use either Gmail or Hotmail (I haven’t tested with the likes of Mail Chimp, Aweber, etc. but would imagine that will work).
  2. The first email that someone receives to their Facebook email address won’t be delivered to them. Instead, it will trigger an email to be sent to them from Facebook, alerting them to the fact that they can disable emails from their @facebook.com email address coming through to their primary email address. If you’re like me, you’ll probably discard any email from Facebook without even reading it. However, once this email has been sent to them, it won’t be sent again, and any email sent to their Facebook email address will instantly come through to them directly from your email address.

With these two points in mind, I suggest setting up a random Gmail or Hotmail account and sending a blank email through to your list of users to trigger the warning email from Facebook (only do this once).

Once you’ve done this, you are ready to start messaging your Facebook followers directly from your own email account. Win!

It’s worth noting here that you’ll want to be really careful not to just start spamming people. You’ve worked really hard to build your Facebook following, so don’t throw it all away with crappy emails. Offer something of value!

View my Slide Deck