Since Facebook updated to version 18 I’m having troubles with adding lead ad forms using the API.
Reference: https://developers.facebook.com/docs/marketing-api/guides/lead-ads/create/
When creating campaigns using the objective LEAD_GENERATION it gives the following error:
"Objective LEAD_GENERATION is invalid. Use one of: OUTCOME_LEADS, OUTCOME_SALES, OUTCOME_ENGAGEMENT, OUTCOME_AWARENESS, OUTCOME_TRAFFIC, OUTCOME_APP_PROMOTION."
However changing the objective to OUTCOME_LEADS give the following error when creating the ad:
"Creative with lead form can only be used for Lead Generation objective. Please create a new one."
2
Answers
I had the same issue ,and the docs are not very clear.
Try adding the "destination_type": "ON_AD" to the ad set params when creating seemed to solve the issue,
Example:
Facebook has updated its campaign objective values. Please use the new objective values when creating or modifying campaigns.
A comprehensive table comparing the old and new objective values can be found at the end of this page:
https://developers.facebook.com/docs/marketing-api/reference/ad-campaign-group#odax
The previous objective values, including APP_INSTALLS, BRAND_AWARENESS, CONVERSIONS, EVENT_RESPONSES, LEAD_GENERATION, LINK_CLICKS, LOCAL_AWARENESS, MESSAGES, OFFER_CLAIMS, PAGE_LIKES, POST_ENGAGEMENT, PRODUCT_CATALOG_SALES, REACH, STORE_VISITS, and VIDEO_VIEWS, are no longer supported.