Few things are more frustrating than knowing about a product that could help you achieve your goals, and at the same time being unable to use it due to technical limitations.
This is what many marketing and business professionals experience with the Facebook API: They know it can help them scale their initiatives to whole new heights, but the lack of coding knowledge prevents them from getting there.
So close and yet so far!
However, there is a way to access and use the Facebook API, even for those who only think of large snakes when hearing the word “python”.
In this post, we will show you how to access the Facebook API without writing a single line of code. But before we get to that, let’s take a brief look at what the Facebook API allows for.
What can you use the Facebook API for?
The Facebook API is the best way to get data from and to Facebook.
It’s an understatement to say that Facebook is a treasure trove of data, but not everyone is aware that a good chunk of this data is publicly available, including:
- Reactions to posts
- Page details
- Message sender details
- Ad and campaign insights
This is some of the data you can get from Facebook through the Facebook API.
On the other hand, you can also post data to Facebook automatically using the API. In other words, the API allows you to:
- Create and schedule posts (including photo and video posts)
- Update posts
- Delete posts
- Update pages with new information (such as phone or email)
- Send messages
- Upload attachments to Facebook Messenger
- Create custom and lookalike audiences for your campaigns
The Facebook API allows you to automate all of the above, relieving you from the burden of time-consuming tasks that affect your bottom line.
But how do you use it when code is something you struggle with?
The answer is simple: Integromat.
Now, as promised, let’s see how to access the Facebook API with Integromat, as well as a couple of interesting use cases to get you started.
A soft landing into the exciting world of Facebook automation
The first thing to know about the Facebook API is that the term actually refers to a group of APIs, which allow you to get and post data to the platform.
There is the Pages API, the Marketing API, and so on. To see the full list of Facebook APIs, you can visit their Developer Docs page.
As you can imagine, the requirements to use these APIs are not the same in every case. The barriers of access are lower in some cases (Facebook Pages, Facebook Groups), and higher in others (Facebook Business Manager, Facebook Messenger).
For example, in order to access the Facebook Pages API, you need to have admin status for the page (or pages) you wish to work with through the API. So, if you already have (or manage) a page, you are pretty much all set in order to access the Pages API.
On the other hand, accessing other APIs from Facebook requires a bit more. For example, in order to use the Messenger API you need to create an app in the Facebook Developer Portal, and then create a verification token to start using the API.
It sounds a bit complicated, but it’s only a couple of extra steps that aren’t required when using other APIs from Facebook.
Taking this into consideration, we’ll start simple and show you how to access and use the Facebook Pages API. To do so, you’ll need the following:
- A Facebook account
- Admin status for a Facebook Page
- An Integromat account (and yes, it can be a free one)
Once you have these three things lined up, follow the instructions below. On top of accessing the Facebook Pages API, we’ll show you how to automate a social media flow using a simple Integromat template.
Accessing the Facebook Pages API with Integromat
In order to get access to the Facebook Pages API, go to your Integromat dashboard, and hit the “Create a new scenario” button on the top right of your screen.
You will land on the visual canvas, where all the Integromat magic happens.
In there, click the button at the center of your screen, and then look for the “Facebook Pages” app on the pop-up menu.
Click on “Facebook Pages”, and a list with the available API endpoints (aka “modules”) will appear in front of you.
Let’s take a moment to understand the modules.
Each of these will allow you to perform a specific action in regards to the Facebook Page you manage. It’s also where the possibilities of the API start to show.
For example, let’s imagine that you wish to leverage your workforce to improve your social media reach. To achieve this, you can ask your employees to share your Page posts on their personal Facebook accounts.
However, there’s a problem: Even though we ask for it, most employees won’t take the time to get the posts from your Facebook Page on a regular basis. Sometimes, new posts won’t show on their Facebook feeds; other times, they simply won’t care.
So, to increase the chance of your employees sharing your Facebook Page posts, we need to make those posts available to all of them as soon as they get published.
To do that, we will create a little integration that will deliver the goods (the posts) to a shared Slack channel, automatically. This way, we will make sure that everyone in the company sees the posts the moment they are published.
Now, back to our Integromat scenario, where we will build this.
From the list of available modules, select “Watch Posts”.
As you can sense, this module will automatically monitor your Facebook Page for new posts. So, each time a post gets published, Integromat (through the Facebook API) will notice it.
The next step is to connect your Facebook and Integromat accounts, which will give us access to the Facebook Pages API on the spot.
After you select the “Watch Posts” module, the configuration box will appear on screen.
Here’s where we access the Facebook Pages API. To do it, click the “Add” button. Another box will appear, where you can (if you want) give a name to the connection. If you don’t want to, just hit “Continue”.
Once you do that, a pop-up will appear. Here’s where you authorize the Integromat - Facebook connection that will provide you with access to the Facebook Pages API.
You will be able to select which pages (of the ones you manage) you want to connect to Integromat. In case you want API access for all the pages you manage, select them all. Otherwise, just choose the one (or the ones) you wish to get API access for.
Once you do this, hit “Next”. Then, you’ll have to allow Integromat to manage your Facebook Pages and click the “Done” button.
Don’t worry, Integromat won’t do anything that you didn't indicate previously on your behalf.
After this, the connection will be established, which means you now have access to the Facebook Pages API.
In the module’s configuration box, select the number of posts you want Integromat to watch (2-3 is fine in this case), and then hit “OK”.
Since we want the posts to be automatically shared to a Slack channel the moment they get published on your page, we will now add a Slack module to our Integromat scenario.
To do this, hover your cursor next to the “Watch Posts” module, and click on the little “plus” symbol that appears when you do this.
Next, search for the Slack app, and select the “Create a Message” module.
The configuration box will appear on screen. As you did with the Facebook module, connect your Slack account to Integromat to get access to the Slack API.
Once you do this, select the Slack channel where you want to share your Facebook Page posts.
In the “Text” field, select the “Link” data operator, and hit “Ok”.
We’re almost done! Now before we get this little integration running, we need to schedule it.
This means that we have to define how often Integromat will check for new posts on your Facebook Page. To do this, click on the little “clock” symbol next to the Facebook Pages module.
Here you’ll be able to set the frequency of “scenario runs”.
As a rule of thumb, the more often you publish, the more often you should tell Integromat to check the page. But if you publish 3-4 posts a day, telling Integromat to check your page once every 3-4 hours makes sense.
Once you define the interval, click “OK”. Then, save the scenario and switch it on.
Now, your API-powered Facebook - Slack integration will share the link of a new post to your selected Slack channel the moment the post gets published, every time a post gets published.
And of course, you now have access to the Facebook API, and have not written a single line of code to get it!
Final thoughts: What else will you be doing with the Facebook API?
Using Integromat, you can get access to all the APIs provided by Facebook.
We feature dozens of modules for several Facebook apps and products, including:
- Facebook Pages
- Facebook Groups
- Facebook Messenger
- Facebook Lead Ads
- Facebook Custom Audiences
- Facebook Insights
- Facebook Conversions
- Facebook Offline Conversions
In addition to this, you can access other Facebook endpoints by using our HTTP app, which will allow you to establish connections to every Facebook API endpoint that is not available (yet) on Integromat.
You will also find valuable Facebook templates (pre-packed scenarios that perform one or more actions) in our Template section.
In case you get stuck somewhere, we recommend you to visit our Help docs, which explain how to establish connections with certain endpoints that have extra requirements.
With Integromat, you can connect the Facebook API to 1,000+ other apps, and automate tasks at will. Some random ideas that we love include:
- Automatically creating lookalike audiences from email lists
- Creating custom audiences from people who liked other page’s posts (say you sell sneakers - you can target people who liked Nike’s Facebook Page posts with Integromat’s help)
- Create a bunch of posts and schedule them to publish around the clock without needing someone to do it
Now it’s time to sit back and think about what you'll be doing with the Facebook API. Let the ideas start flowing!