Problem/Motivation
According to facebook developers instructions, embed content in Instant Articles must be encapsulated in <figure class="op-interactive"> tag.
https://developers.facebook.com/docs/instant-articles/reference/embeds/
Embeds are specified using the standard HTML element, which wraps an
element containing the markup for your embedded media. To include any social embed or interactive element in your Instant Article, apply the op-interactive class to a element.
The element representing the embed must be included standalone within the body of the article and not enclosed within a
element.
Steps to reproduce
Embed any content (youtube, facebook, twitter, etc) and publish the article to Facebook Instant Article
Proposed resolution
In the process method of UrlEmbedFilter add:
$url_output = '<figure class="op-interactive">' . $url_output . '</figure>';
Before replaceNodeContent
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
leofishman commentedComment #3
leofishman commentedComment #4
leofishman commentedApplying this patch will add the tags required by Facebook