Connect Facebook with MESA
When you're setting up your first workflow with Facebook, you'll need to create an app in the Facebook Developer Portal and use that to create a credential in MESA.
In the MESA workflow builder, add any Facebook step to your workflow, and you will see a field for Client ID and Client Secret under the Credentials section.
To get these values, you will need to be registered as a Facebook developer and create a new MESA app on Facebook. To start the registration, go to the Facebook for Developers website and click Get Started in the top-right. You will be prompted to enter your Facebook username and password if you are not already logged in. Click Next on Facebook's Platform Terms and Developer Policies and enter your phone number and verify your account via text message or phone call.
Once you are registered you can use the Facebook Developers App Dashboard to create your first app. Click the green Create App button and select an App Type in the pop-up that appears (we typically select Business).
Next, on the "Add Products to Your App" page, click Set Up on the Facebook Login tile.
https://app.getmesa.com/apps/mesa/oauth/redirect-tokenin the "Valid OAuth Redirect URIs" field and click Save Changes.
If you are going to be using the Facebook Marketing API to retrieve reports and manage campaigns and advertisements, click on the Add Product link in the left sidebar, and then click Set Up on the "Marketing API" tile. If you are already using Facebook advertisements, you should have already created a Facebook Business Manager. If you do not yet have a Business Manager, create one in the Facebook Business Portal. In the left sidebar, under "Marketing API", click Settings and click on the Select a Business Manager dropdown to select your Business Manager.
Now you have successfully created your Facebook App. We're ready to get the Client ID and Client Secret to enter into the MESA credentials form. In the left sidebar, select Settings > Basic. Copy the App ID field and paste this into the Client ID field in the MESA Credential form. Next, click Show next to the App Secret field and copy that into the Client Secret field in the MESA fields.
Click the green Authenticate with Facebook button in MESA. You will be instructed to log in to Facebook if necessary, and then prompted to connect the app you created with your Facebook account and asked if you want to grant permissions. Click Continue on both popups.
Once you have finished granting permissions, you will be redirected back to your MESA dashboard, and an existing Credential will be selected in the Credentials section.
Congratulations! You have successfully connected MESA with your Facebook account. You will be able to select your existing Facebook credential for any future Facebook steps you add in MESA.
Most Facebook actions will require you to select an Ad Account or Business Account. These fields are type-ahead selects that will automatically select from the Facebook accounts tied to your credential.
Simply click into these fields and an account should appear. If no accounts appear, ensure that you have created an Ad Account in your Facebook Business Portal and that you have followed all of the steps outlined above to properly set up a credential.
The Facebook Insights API is a powerful way to build custom reports on Facebook. You can specify fields to return, group by (the Level configuration option), sort by, and custom date ranges to query over.
You can even apply a customized filter to limit the data that is returned. Use the helpful tooltips next to fields for more details about each option and consult the Facebook documentation for a full list of available fields, or example queries that can be run.
Many Facebook actions require specific combinations of parameters to be successfully created and updated. Consult the Facebook Marketing API documentation for full details.