I got “The transformer you selected is invalid†error when creating a Facebook Creative via Business API
Digital Marketing
Facebook Marketing API
2 years ago
5
Star Rating
1
Rating
_x000D_
_x000D_
I'm creating Facebook Dynamic Ads for vehicle vertical for multiple dealerships. The 95% of the times the call to create a creative for a dynamic ad works well, however when the url contains VehicleSearchResults in the URL it fails.
This is the call error example using the Python SDK:
Path: https://graph.facebook.com/v2.11/act_xxxxxxxxx/adcreatives
Params: {
'name': '{{vehicle.price}} - {{vehicle.title}}._CREATIVE',
'product_set_id': u'1234567890',
'url_tags': '',
'object_story_spec': '{
"page_id":"1234567890",
"template_data":{
"call_to_action":{
"type":"SHOP_NOW",
"value":{
"link":"https://www.mywebpage.com/VehicleSearchResults?search=preowned&model={{vehicle.model | urlencode}}"}},
"description":"","link":"https://www.mywebpage.com/VehicleSearchResults?search=preowned&model={{vehicle.model | urlencode}}",
"message":"","name":"{{vehicle.price}} - {{vehicle.title}}"}}',
'template_url_spec': '{
"web":{
"url":"https://www.mywebpage.com/VehicleSearchResults?search=preowned&model={{vehicle.model | urlencode}}"}}',
'applink_treatment': 'web_only'
}
Response:
{
"error": {
"code": 100,
"is_transient": false,
"error_subcode": 1487893,
"error_user_msg": "The transformer you selected is invalid.",
"error_user_title": "The template field transformer is invalid",
"message": "Invalid parameter",
"type": "OAuthException",
"fbtrace_id": "ABhi8rjLjor"
}
}
I followed the guide described here and is in this page where urlencode transformer is mentioned and it works well as long as the text VehicleSearchResults is not present in the URL. When I remove it from the URL the call works well, but I did not find any documentation related to the url transformers and/or use cases and exceptions.
Posted on 16 Aug 2022, this text provides information on Facebook Marketing API related to Digital Marketing. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Take Quiz To Earn Credits!
Turn Your Knowledge into Earnings.