Exploiting Facebook Open Graph to Email Your Facebook Followers

Last Updated:

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:


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


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:


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


About Matthew Barby

Global Head of Growth & SEO at HubSpot, award winning blogger, industry speaker and lecturer for the Digital Marketing Institute.

Sign Up To My Newsletter

32 Responses

Hammad Rafique

Is it possible to generate a email list via Facebook page likes? Any suggestion matthew?

Matthew Barby

Hey Hammad, you can build the list of emails via the technique that I’ve outlined here. If you’d like to gather their information further then you could send out an email that would require a response from them. Maybe an incentive of some sort that would give you their full personal email address.


I never knew facebook forwarded their own email addresses to the primary addresses.

Quality blog post Matthew, though i managed to beat your suggested time to read it 😉

Matthew Barby

Yep, they started doing this at the start of this year 🙂


This is great! But I have to ask, just how legal is this tactic in terms of privacy and spam?

Matthew Barby

If I’m completely honest, the answer is that I’m not sure. I wouldn’t recommend offering this out to clients before doing some serious legal checking. Once I have a clear answer I’ll let you know.

Charles Floate

Hey Matt,

Great tutorial!

Social Lead Fox does work, you just need to update to the latest version via downloading it and inputting an App ID and Secret Key, instead of authenticating an account. It still works brilliantly.

Be careful when sending this kind of level of emails – Facebook can catch on and ban your emails, and Gmail is hard to hit with emails. I suggest using a service called Sendy.co, which is only $1 per 10,000 emails sent and uses gmail whitelisted IPs to send your emails from.

Matthew Barby

Hey Charlie, I still haven’t been able to get Social Lead Fox, even after doing all that 🙁 Saying that, Facebook ID Scraper gets SO many more results than SLF did, so it’s a win-win for me.


Damn Matt – this is just plain dirty (in a good way, that’s kind of bad too)

Matthew Barby



Matt – what is your strategy for hiding that you’re sending it to their @facebook.com email?

I think that might be the deal breaker for anyone who sees the “from” and “to” fields.

But I imagine there’s a workaround.



Hey Matthew,

Insane writing and thanks for sharing. Though I think this is a huge risk to do so, it is a great idea man!

Thanks for sharing and keep it up!

Matthew Barby

Thanks, Reginald. Glad you found it useful.


I can admire the sheer innovation in acquiring such emails. However, I think there may be some ethical concerns in sending out emails to users who aren’t a fan of your brand yet. I think it’s a great way to reach out to a new audience but it borders spam when they hadn’t initiated a conversation. But I love the use of multiple tools to get a job done!

Matthew Barby

I’ll agree with you there – this is technically still spam and you really need to be careful. My job is to show you what is possible, your job is to decide whether you’d want to actually do it. All emailing aside, just simply scraping Facebook graph can get some great results, not to mention the fact that you can add any Facebook UIDs into custom audience groups in Facebook ads and start marketing ads directly to them.


I guess if a fan on Facebook has ‘liked’ your page – they wouldn’t mind getting the odd email from you, not as spammy as just blasting out emails to people who havn’t heard of you?


Hey Matthew,
I’m trying this out exactly as you specified on your tutorial but for some reason is giving me a field error. Could you please help me out?
Do you have an example that you could send me over.


Matthew Barby

Hey Andres, which fields are you getting an error on? Have you installed the SEO Tools plugin?


All the fields where I try to add a JsonPathOnURL.

Yes, I’ve installed the SEO plugin, do I need to set something up or should this be working automatically?

Atanu Das

Hey, Matt, I never knew that we can extract the facebook Email in such a manner. Nice blog post, surely gonna help to all the Digital Marketers. Thanks for sharing this!

Paul Shapiro

So, I tried this method and it may be interesting for people to know that I only got 1 subscriber from the following email:

Howdy Y’all,

This is Paul Shapiro.

You’re receiving this message because you liked my Facebook page at some point (https://www.facebook.com/SocialMediaTechBlog).

As some of you may be aware, Facebook has been decreasing the organic reach of posts from Facebook pages like mine (forcing us page owners to buy advertising on FB), and making it very unlikely that you will see my posts.

So in an effort to make sure you guys see my posts—I’m emailing you, just this once, to let you know that if you’re interested in receiving updates from me (I don’t send many) about the latest internet marketing tips…

…you should subscribe to my newsletter here:


(don’t worry, this just sends you to a MailChimp subscription form)

Don’t subscribe and you won’t receive an email from me again.

Subscribe and you’ll get the exclusive tips that I’ve been sharing in my newsletter (you can preview one here and another here)

You’ll also get my new, free link building tool upon subscription.

Again, I’m sorry if I annoyed you. This will be the first and final time.

All the Best,

Paul Shapiro

Do it better than me, I guess 🙂

Matthew Barby

Thanks for sharing, Paul. Always useful to see the results of what you’ve done, whether they were positive or negative.

Anuj Agarwal

Hi Matthew – Really great article. i Had downloaded the SEO tool but never got to using it… going through your youtube tutorial now…

Question about the current method – If i am a member of Group X (not owner) – can the method be applied to the group and can all the emails be extracted ?

Matthew Barby

Yes, it can. You can gather the followers of groups, pages and even those that have liked a post.


However, emails sent to the @facebook IDs generally land up in the Other folder of Facebook Messages which is rarely checked by FB users. Nice technique nonetheless!


Hey Matthew,

This is super clever. Good on you! Hopefully though, people won’t use it to spam users across the internet. Incredible, really. A bit complicated, but a good strategy. I am going to share it today on our blog.

Thanks 🙂



HI Matt, Interesting post. Have you thought about applying this idea to Facebook’s audience builder tool? So instead of using it to build an email list to send emails, you are using it to build an audience you can place ads on their Facebook profile pages. For example, if I wanted to place an ad on Facebook to everyone who likes my competitor’s Facebook page (or can this already be done using Facebook’s audience builder tool)?

Mark Kawabe

Greetings Matthew,

A very interesting article. For those who may have Canadians who like their Facebook page (or are part of their group), please be aware that the new Canadian anti-spam law would likely view an email sent to a scraped list of addresses as spam.

Definitely check with your legal advice source before emailing Canadians. The law has been around for a while but it’s only been implemented as of July 1, 2014.

A very interesting tactic though…thank you for the article!

Best Regards,

Stephen Garrett

Great tools, however when using the SeoTool and I run the =JsonPathOnUrl(B1, “username”) within the cell, the data starts to pull through and I start to see some usernames and when finished processing either around 50% of the usernames come through and the rest say #VALUE! as if the formula is broken, then when I rerun it, all fields return with no value 🙁



Great post. Just a quick question, can we some how figure out the location (country level) of the prospect before we send out e-mails?

Matthew Barby

Yes – you could also scrape this from Facebook Graph 🙂

Mustafa Gaziani

Hi Matthew,

Wow! you rock man. this is an amazing trick to grab thousands of email through facebook immediately.

But disadvantage of this method is that many of facebook user can’t check their personal email on daily or weekly basis. Another disadvantage is that they are not relevant of this community 🙁