Reputation: 1425
I am using Amp social share on a project. The social share feature is working as expected, but upon validation I get the following error:
The tag 'amp-social-share' is disallowed.
In my header, I'm linking to: https://cdn.ampproject.org/v0/amp-social-share-0.1.js
In the the body I'm including multiple <amp-social-share>
components:
<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>
To the best of my knowledge, these are setup in accordance with the specification here: https://github.com/ampproject/amphtml/blob/master/extensions/amp-social-share/amp-social-share.md
Is there something I'm missing that will help me validate this component?
Upvotes: 0
Views: 411
Reputation: 307
The reason for the validation error The tag 'amp-social-share' is disallowed
is because amp-social-share is an experimental component and is not in the validator yet. It's confusing since it's currently listed as an 'Extended Component' on ampproject.org.
Also note that generic class names like twitter
may be changing to more descriptive names like amp-social-share-twitter
. See https://github.com/ampproject/amphtml/issues/1201
Upvotes: 5