facebookarchive / facebook-instant-articles-sdk-php

The Facebook Instant Articles SDK for PHP provides a native interface for creating and publishing Instant Articles.
https://instantarticles.fb.com/
Other
232 stars 148 forks source link

How to convert oembed div wrapped media to interactive format #237

Closed pribeh closed 6 years ago

pribeh commented 7 years ago

Hi,

I'm trying to figure out how to write a rule for converting embedded media in the non-iframe oembed format. This is dissimilar to iframes and I'm not sure it's even supported. Any ideas? Should it be converted to an iframe and then inserted into the figure class.op-interactive?

Here's what the output looks like in the body of content for a Twitter embed.

<div data-oembed-url="https://twitter.com/aynehassan_/status/811203920898953216">
<twitterwidget class="twitter-tweet twitter-tweet-rendered" id="twitter-widget-4" style="position: static; visibility: visible; display: block; transform: rotate(0deg); width: 500px; margin: 10px auto; max-width: 100%; min-width: 220px;" data-tweet-id="811203920898953216"></twitterwidget>
<script async="" charset="utf-8" src="//platform.twitter.com/widgets.js"></script></div>
vkama commented 6 years ago

@pribeh Are you still needing help with this?

pribeh commented 6 years ago

No.