Search code examples
amp-html

Attribution attribute on amp-social-share for Facebook doesn't seem to work


I'm trying to implement AMP, and when I go to /url.html#development=1 the Facebook amp-social-share node errors saying "attribution is required". But I have an attribution attribute on that node and it's a valid Facebook AppID.

<amp-social-share type="facebook" attribution="[FBAppID]" width="60" height="44"></amp-social-share>

Why might that amp-social-share node fail and the other three work?

I also have this in the <head> even tho I'm not sure it's necessary:

<script async="async" custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>

Is this something that is still under construction?


Solution

  • Looks like you're using the attribute attribution, rather than data-attribution.

    https://github.com/ampproject/amphtml/blob/master/extensions/amp-social-share/amp-social-share.md#simple-examples

    This example shows specifying attribution as an element attribute.