I need to add fixed values in the ad rule. It's possible? or other way?
I'm trying this way, but the width and height don't work. I also tried using 'constant' and 'value' for the width and height, worked only for the url
{
"generator_name": "facebook-instant-articles-builder",
"generator_version": "0.2.0",
"rules": [
{
"class": "TextNodeRule"
},
{
"class": "GlobalRule",
"selector": "html",
"properties": {
"article.title": {
"attribute": "content",
"selector": "span i",
"type": "element"
},
"article.publish": {
"format": "Y-m-d\\TH:i:s",
"selector": "[ia-date]",
"type": "date"
},
"author.name": {
"selector": "[ia-author]",
"type": "string"
},
"image.url": {
"attribute": "content",
"selector": "[property=\"og:image\"]",
"type": "string"
},
"article.body": {
"selector": ".text",
"type": "element"
},
"article.canonical": {
"attribute": "href",
"selector": "link[rel=canonical]",
"type": "string"
}
}
},
{
"class": "EmphasizedRule",
"selector": "em"
},
{
"class": "BoldRule",
"selector": "b, strong"
},
{
"class": "ImageRule",
"selector": "img",
"properties": {
"image.url": {
"attribute": "src",
"selector": "img",
"type": "string"
},
"image.caption": {
"attribute": "src",
"selector": "img",
"type": "element"
}
}
},
{
"class": "AdRule",
"selector": "[ia-ad-url]",
"properties": {
"ad.url": {
"attribute": "ia-ad-url",
"selector": "[ia-ad-url]",
"type": "string"
},
"ad.width": {
"attribute": "ia-ad-width",
"selector": "[ia-ad-width]",
"type": "int"
},
"ad.height": {
"attribute": "ia-ad-height",
"selector": "[ia-ad-height]",
"type": "int"
}
}
},
{
"class": "PassThroughRule",
"selector": ".summary-content,.summary-news,.slot-g,.text,.youtube-embed,.related-content-hyperlink"
}
]
}
https://developers.facebook.com/docs/instant-articles/sdk/transformer/ https://developers.facebook.com/docs/instant-articles/builder