Amp Social Share 验证失败,但该组件有效
Amp Social Share Validation Failing, but the component works
我正在一个项目中使用 Amp 社交分享。社交分享功能按预期工作,但在验证后我收到以下错误:
The tag 'amp-social-share' is disallowed.
在我的 header 中,我链接到:https://cdn.ampproject.org/v0/amp-social-share-0.1.js
在 body 我包括多个 <amp-social-share>
组件:
<div class="social-share">
<amp-social-share type="pinterest" width="35" height="35" data-text="MY_TEXT" data-url="MY_URL" data-attribution="MY_ATTR">
<div>
<a class="custom">MY_SVG</a>
</div>
</amp-social-share>
<amp-social-share type="twitter" width="35" height="35" data-text="MY_TEXT" data-url="MY_URL" data-attribution="MY_ATTR">
<div>
<a class="custom">MY_SVG</a>
</div>
</amp-social-share>
<amp-social-share type="facebook" width="35" height="35" data-text="MY_TEXT" data-url="MY_URL" data-attribution="MY_ATTR">
<div>
<a class="custom">MY_SVG</a>
</div>
</amp-social-share>
<amp-social-share type="gplus" width="35" height="35" data-text="MY_TEXT" data-url="MY_URL">
<div>
<a class="custom">MY_SVG</a>
</div>
</amp-social-share>
</div>
据我所知,这些是根据此处的规范设置的:https://github.com/ampproject/amphtml/blob/master/extensions/amp-social-share/amp-social-share.md
有没有我遗漏的东西可以帮助我验证这个组件?
验证错误的原因The tag 'amp-social-share' is disallowed
是因为 amp-social-share 是一个实验组件,尚未在验证器中。这令人困惑,因为它目前在 ampproject.org.
上列为 'Extended Component'
另请注意,twitter
等通用 class 名称可能会更改为更具描述性的名称,如 amp-social-share-twitter
。参见 https://github.com/ampproject/amphtml/issues/1201
我正在一个项目中使用 Amp 社交分享。社交分享功能按预期工作,但在验证后我收到以下错误:
The tag 'amp-social-share' is disallowed.
在我的 header 中,我链接到:https://cdn.ampproject.org/v0/amp-social-share-0.1.js
在 body 我包括多个 <amp-social-share>
组件:
<div class="social-share">
<amp-social-share type="pinterest" width="35" height="35" data-text="MY_TEXT" data-url="MY_URL" data-attribution="MY_ATTR">
<div>
<a class="custom">MY_SVG</a>
</div>
</amp-social-share>
<amp-social-share type="twitter" width="35" height="35" data-text="MY_TEXT" data-url="MY_URL" data-attribution="MY_ATTR">
<div>
<a class="custom">MY_SVG</a>
</div>
</amp-social-share>
<amp-social-share type="facebook" width="35" height="35" data-text="MY_TEXT" data-url="MY_URL" data-attribution="MY_ATTR">
<div>
<a class="custom">MY_SVG</a>
</div>
</amp-social-share>
<amp-social-share type="gplus" width="35" height="35" data-text="MY_TEXT" data-url="MY_URL">
<div>
<a class="custom">MY_SVG</a>
</div>
</amp-social-share>
</div>
据我所知,这些是根据此处的规范设置的:https://github.com/ampproject/amphtml/blob/master/extensions/amp-social-share/amp-social-share.md
有没有我遗漏的东西可以帮助我验证这个组件?
验证错误的原因The tag 'amp-social-share' is disallowed
是因为 amp-social-share 是一个实验组件,尚未在验证器中。这令人困惑,因为它目前在 ampproject.org.
另请注意,twitter
等通用 class 名称可能会更改为更具描述性的名称,如 amp-social-share-twitter
。参见 https://github.com/ampproject/amphtml/issues/1201