Topics covered in this article
We currently support two methods for posting new ads to Facebook: Facebook API and Zapier/IFTTT Webhooks.
Support for Facebook API will be removed in the future. Facebook significantly reduced access to their APIs across all apps on April 4, 2018. Now it takes longer and is more difficult to configure Facebook Apps that can post content to pages or groups. As a result, it is unlikely that this integration is going to work for new users. We introduced support for Zapier/IFTTT Webhooks as an alternative and expect customers to migrate to that integration method.
You can read more about Facebook changes here: https://developers.facebook.com/blog/post/2018/04/04/facebook-api-platform-product-changes/
Facebook and Zapier Integration
Another WordPress Classifieds Plugin supports sending ads to Facebook using Zapier Webhooks. This document explains how to create a Zap for this purpuse and update the plugin settings to use it.
Prepare the plugin to interact with Zapier
- Set Zapier/IFTTT Webhooks as the selected Facebook Integration Method.
- Disable Send Ads to Facebook Automatically and Ask Facebook to clear cache for ads pages. We want the process to be manual during the creaton of the Zap. You can enable these features again at the end of the process.
Create a Zap
- Create or login to your Zapier account. Then go the Zap Editor.
- Choose Webhooks as the Trigger App:
- Select Catch Hook as the Trigger and click Save and Continue
- Skip the Pick off a Child Key setp by clicking Continue.
- Copy the webhook URL that appears on the Test step:
- Go to the Facebook Settings on AWPCP and paste the webhook URL as the value for the Zapier webhook used to send ads to a Facebook page setting. Then click Save Changes.
- Go to the list of ads on the admin dashboard and click the Send to Facebook action for the test ad you created before:
- Now go back to the Zap Editor and click the Ok, I did this button. You should see a list of at least one sample hook to choose. Expand the hook details to make sure it includes the information from the test ad:
Then choose a hook and click Continue.
- Choose Facebook Pages as the Action App:
- Select Create Page Post as the Action and click Save + Continue:
- Chose a connected Facebook account or connect one using the Connect an Accountbutton. Then click Save + Continue:
- Select the Facebook Page where you want to send the ads:
- Provide a message for the Facebook post. You can enter a custom message, use the title or description of the ad or a combination of those. Click the plus at the top right corner of the textarea to insert the titile or description of the ad:
- Select the URL of the ad as the content of the Link URL field. This is required if you want Facebook to load the thumbnail, title and description from the Open Graph meta tags included in the page of the ad:
- Once you have selected a Facebook Page, provided a message and a link URL, click Continue. Zapier should now show an example of the message that is going to be posted to the selected page:
Click the Send Test To Facebook Page button and wait for Zapier to show a confirmation message:
Then check that the post was created on the selected page and click Finish.
- To complete the proceess, provide a name for the Zap you just configured and turn it on:
Update plugin settings
- Double check that Zapier/IFTTT Webhooks is selected as the Integration Method.
- Enable Send Ads to Facebook Automatically if you want the plugin to send request to the webhook URL automatically.
- Enable Ask Facebook to clear cache for ads pages if yoiu want the plugin to ask Facebook to clear the cache it has stored for ads pages before trying to send a request to the webhook URL.
Facebook and IFTTT (If This Then That) Integration
Another WordPress Classifieds Plugin supports sending ads to Facebook using IFTTT Webhooks. This document explains how to create a Applet for this purpuse and update the plugin settings to use it.
Prepare the plugin to interact with IFTTT
- Set Zapier/IFTTT Webhooks as the selected Facebook Integration Method.
- Disable Send Ads to Facebook Automatically and Ask Facebook to clear cache for ads pages. We want the process to be manual during the creaton of the Applet. You can enable these features again at the end of the process.
Create an Applet
- Create or login to your IFTTT account. Then go the Webhooks Settings.If this is your first time using Webhooks on IFTTT, click the Connect button. You should be redirect to the same URL, but this time the page should show the webhook URL:
- Copy the webhook URL that appears on screen.
- Go to the New Applet screen:
- Click on +this and then find and choose the Webhooks service:
- Choose Receive a web request as the Trigger:
- Enter an Event Name and click the Create Trigger button:
You can use any event name you want. Just remember to kepp that name at hand because we will use it later in the configuration.
- Click on +that and then find an choose the Facebook Pages service:
- Choose Create a link post as the Action:
- Click Add ingredient under the Link URL textfield and select Value1:
- Type a message, optionally using ingredientes from the event to customize the content.
The ValueN ingredientes from the event correspond to the following ad properties:
- Value1: The URL of the ad.
- Value2: The title of the ad.
- Value3: The descriptoon of the ad.
- Review your applet and click Finish:
- Go the Facebook Settings on AWPCP and enter the webhook URL from step 2 and the event name from step 6 as the value for the URL used to send requests to IFTTT Webhooks service and The name of the event that will be posted to the Webhooks service settings, respectively:
- Go to the list of ads on the admin dashboard and click the Send to Facebook action for the test ad you created before:
Update plugin settings
- Double check that Zapier/IFTTT Webhooks is selected as the Integration Method.
- Enable Send Ads to Facebook Automatically if you want the plugin to send request to the webhook URL automatically.
- Enable Ask Facebook to clear cache for ads pages if yoiu want the plugin to ask Facebook to clear the cache it has stored for ads pages before trying to send a request to the webhook URL.