2017-07-07 3 views
0

Facebook Instant Articlesの検証に問題があります。私の記事の一つは、このエラーメッセージがポップアップ表示されます:スライドショーでサポートされていない要素(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

問題が見つかりました。それは構造とは関係がありませんでした。画像の1つがGIFで、スライドショーではサポートされていません。

0

スライドごとにfigcaptionを追加することはできません。内側のタグ内に画像のみを囲むことができます。 正しい形式は次のとおりです。

<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> 
関連する問題