Social login in Mautic is used to sign forms and pre-fill them with matched content, and also to update/create a contact in Mautic with the information gathered from the social profile once the user has been signed in.
First of all, you’ll need a Facebook Developer account.
- To get started, you need a Facebook Developer account. If don’t have one already, you can go here to sign up for one. Scroll down and then click Create Developer Account button.
Create your new Facebook app.
- Once you have a developer account, go to developers.facebook.com/apps. At the top right of the page, click the green button that says Add a New App.
- A pop window opens. Fill out your app name and email address then click the Create App ID button in the bottom right to proceed.
Configure Facebook Login.
- You should now be on the Select a Product page. From here, choose to set up Facebook Login.
- Don’t use Quickstart – instead, in the left menu, go to Products > Facebook Login > Settings.
- Here, make sure “Client OAuth Login” and “Web OAuth Login” are both set to YES.
- Under “Valid OAuth redirect URIs”, enter the callback URL that you can find within Automation.
- To find this callback URL, connect to your Automation instance, go to plugin and Facebook.
- Click on the Facebook plugin.
- Copy and past this callback URL your Facebook App.
Add your website as a platform.
- In the left menu, choose Settings > Basic Settings (for the main app, not the Facebook Login product).
- Click the wide + Add Platform button at the bottom of the page.
- In the popup window, choose Website. Enter your Automation instance URL in the appropriate field.
- Click Save Changes when you’re done.
- If you’re just testing things out and don’t mind your app staying in development mode, you can skip this.
Enter your app domain.
- Add your domain to the App Domains field. This should match the one you used in the Website Site URL field in the previous step. Again, don’t forget to save your changes.
Make your app public.
- At the top of the page, set your app to public.
- This is required if you plan to use Mautic’s social login feature publicly. If you’re just testing, you can skip this.
Set the Facebook plugin in Automation.
- Go back in the Facebook plugin setting within Automation.
- Click on "YES" to publish the plugin.
- Fill the client ID: From your Facebook app settings page, copy the App ID and paste it into this field.
- Fill client secret field: From your Facebook app settings page, copy Secret Key and paste it into this field.
- Finally, press Authorize App!
- Once you click the Authorize App button, a new Facebook pop-up window will open. Follow the prompts to complete app authorization.
- Back in the Facebook plugin setting, click the Features tab, make sure "Login Button" and "Display public profile…" boxes are checked (they should be by default).
- Click the Contact Mapping tab to map your contact fields to Facebook fields. Keep in mind that you will only be able to map a select number of public profile fields such as email, first and last name, and time zone.
Plugin setup complete! But you’re not done yet….
Your Automation Facebook integration is now complete. Make sure the plugin is published (set to Yes).