Category / Section
How to Create and Connect a Facebook App to Access Facebook Pages API with FlowMattic
2 mins read
Updated:
Overview
This guide outlines a step-by-step process for creating a Facebook app and integrating it with FlowMattic to access the Facebook Pages API. Follow the instructions below to enable smooth integration and manage Facebook Pages via FlowMattic workflows.
Steps to Create and Connect a Facebook App
Step 1: Create a Facebook App
- Visit the Facebook Developer Documentation to initiate the app creation process.
- Login with your Facebook account and visit this page - Create Facebook App
- Enter App Name and email and click next, on the Use Cases section, choose Other and click next
- On next step, choose App Type as Business and click next
- Verify the details, choose your Business portfolio if already have and click Create App button
Step 2: Enable Products
- Access your Facebook App Dashboard and navigate to the section labeled “Add products to your app.”
- Click the “Setup” button next to “Facebook Login” and “Webhooks.”
Step 3: Configure Products
Facebook Login for Business:
- Go to Settings under Facebook Login for Business.
- Add the following URL under Valid OAuth Redirect URIs:
https://api.flowmattic.com/facebook-pages
- Specify the Allowed Domains for the JavaScript SDK:
https://api.flowmattic.com
Webhooks:
- After adding webhooks to the app, you will be asked to choose the object and subscribe to the object like below. Choose Page as object and click the subscribe button.
- Facebook permits only one webhook URL per app. To use Facebook Pages integration across multiple workflows with different triggers, utilize the following webhook URL and connect it to your Facebook Pages trigger in the workflow:
https://api.flowmattic.com/facebook-pages/webhook.php
- Use the verify token:
FlowMatticPages
- Alternatively, for custom webhook URLs, configure the Router to handle different triggers based on Facebook’s data. Use the verify token:
flowmattic
(all lowercase). - After setting up the webhook URL, click the Subscribe button next to the Feed item in the list and set the version to 22.0.
Step 4: Retrieve Client ID and Client Secret
- Navigate to App Settings -> Basic.
- Securely copy and save the App ID and App Secret.
Step 5: Connect to Facebook Pages
- Open FlowMattic -> Connects.
- Click the Connect Integration button.
- Search for Facebook Pages and select it.
- Input the App ID and App Secret into the Client ID and Client Secret fields.
- Click Save and Authenticate and complete the Facebook account authentication process.
- During authentication, ensure that the pages you wish to use are selected.
Tips
- Verify the accuracy of URLs and tokens to prevent configuration errors.
- When using custom webhook URLs, ensure the Router is correctly set up to manage various triggers.
Additional Context
This setup facilitates the integration of Facebook Pages into multiple workflows and triggers via FlowMattic, enabling streamlined page management and task automation.