Hi @mattebox.
WordPress itself normally takes care of converting a simple YouTube link within your content into the necessary embed code for YouTube videos. When this is done, our plugin will automatically generate the necessary Instant Articles markup with the <figure class="op-social"> as you mentioned.
Could you provide some more information about your environment which would help reproduce the issue? For example:
– What version of WordPress are you using?
– What version of the plugin are you using?
– What version of PHP are you using (if known)?
– What’s the debug output shown in the post edit screen on the Facebook Instant Article box (both sides)?
Thanks!
I think the questions in this issue were answered by my previous comment. For clarity: no you are not required to put the size in the embed.
Here is a real-world example:
Your post’s content within WordPress:
https://www.youtube.com/watch?v=dKrVegVI0Us
WordPress converts that link into the following (so this is the markup that you post contains when viewed on the normal web):
<div class="embed">
<iframe width="840" height="473" src="https://www.youtube.com/embed/dKrVegVI0Us?feature=oembed" frameborder="0" allowfullscreen></iframe>
</div>
This plugin will transform the markup above into the following inside the Instant Article:
<figure class="op-social">
<iframe src="https://www.youtube.com/embed/dKrVegVI0Us?feature=oembed"></iframe>
</figure>
I hope that clarifies any remaining doubts.
This still happens to me. The output for it is empty. The wordpress conversion works fine, the Instant Article conversion doesn’t.
WP: 4.5.3
Plugin: 3.0.1
PHP: not sure, but quite recent
Additionally, I get these in the error log:
Jul 20 11:28:36 projectname PHP Warning: Missing argument 2 for instant_articles_embed_oembed_html() in /www/wp-content/plugins/fb-instant-articles/embeds.php on line 25 when calling instant_articles_embed_oembed_html(), request: GET /2014/11/27/unexpected-thug-life-videos/, request_id: 98c31bbeb48ef6307a69439c7d9f3abf
Jul 20 11:28:36 projectname PHP Warning: Missing argument 3 for instant_articles_embed_oembed_html() in /www/wp-content/plugins/fb-instant-articles/embeds.php on line 25 when calling instant_articles_embed_oembed_html(), request: GET /2014/11/27/unexpected-thug-life-videos/, request_id: 98c31bbeb48ef6307a69439c7d9f3abf
Jul 20 11:28:36 projectname PHP Warning: Missing argument 4 for instant_articles_embed_oembed_html() in /www/wp-content/plugins/fb-instant-articles/embeds.php on line 25 when calling instant_articles_embed_oembed_html(), request: GET /2014/11/27/unexpected-thug-life-videos/, request_id: 98c31bbeb48ef6307a69439c7d9f3abf
A similar error happens when using the [gallery] shortcode.
This is a valid problem. I’m experiencing it too. The youtube code simply disappears. The only work-around was to use youtube’s embed code, and hard-embed that code into the post. The automatic wordpress conversion, disappears in instant articles. Quite annoying. Is there a solution to this?