Closed tungvn closed 6 years ago
meta
<meta property="fb:op-recirculation-ads" content="placement_id=xxxxxxxxx">
$rules = file_get_contents(__DIR__ . "/facebook-sdk-php/vendor/facebook/facebook-instant-articles-sdk-php/src/Facebook/InstantArticles/Parser/instant-articles-rules.json", true); // Create the transformer and loads the rules $transformer = new Facebook\InstantArticles\Transformer\Transformer(); $transformer->loadRules($rules); libxml_use_internal_errors(true); $document = new \DOMDocument(); $v_news_html = mb_convert_encoding($v_news_html, 'HTML-ENTITIES', "UTF-8"); $document->loadHTML($v_news_html); libxml_use_internal_errors(false); $transformer->transform($instant_article, $document);
I added some custom rules for this meta tag, but anything change
{ rules: [... ,{ "class" : "PassThroughRule", "selector" : "head meta" } ] }
$__fbClient->importArticle($instant_article);
How to add that meta tag?
I have make a PR to fix this issue
meta
tag "fb:op-recirculation-ads", like this:I added some custom rules for this
meta
tag, but anything changeHow to add that meta tag?