2017-07-07 74 views
0

我有一个Facebook的即时文章验证问题。对于我的一篇文章中此错误消息弹出:幻灯片放映中的不支持的元素(Facebook即时文章)

Slideshow Contains Unsupported Elements: Only image elements can appear in a slideshow. Ensure that slideshow (at /html/body/article/figure[3]) only contains supported elements. Refer to Slideshows under Format Reference in Instant Articles documentation for more information.

下面的代码:

<figure class="op-slideshow"> 
    <figure> 
     <img src="https://www.example.com/image1.jpg"> 
     <figcaption>Caption1</figcaption> 
    </figure> 
    <figure> 
     <img src="https://www.example.com/image2.jpg"> 
     <figcaption>Caption2</figcaption> 
    </figure> 
</figure> 

它是由PHP官方SDK生成的,并且在本例中,他们使用的是非常相似的结构。 (http://take.ms/nookv)这是一个错误?

回答

0

我发现了这个问题。它与结构无关。其中一张图片是GIF,事实证明,幻灯片不支持该功能。

0

您无法为每张幻灯片添加无花果图片,只有图片可以包含在内部标签中。 正确的格式是:

<figure class="op-slideshow"> 
    <figure> 
    <img src="http://example.com/path/to/img1.jpg" /> 
    </figure> 
    <figure> 
    <img src="http://example.com/path/to/img2.jpg" /> 
    </figure> 
    <figure> 
    <img src="http://example.com/path/to/img3.jpg" /> 
    </figure> 
    <figcaption>This slideshow is amazing.</figcaption> 
</figure>