2016-03-21 36 views
0

我试图实施AMP,并且当我转到/url.html#development=1时,Facebook放大器 - 社交共享节点错误“需要归属”。但是我在该节点上有一个归因属性,它是一个有效的Facebook AppID。Facebook的amp-social-share的归因属性似乎不起作用

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

为什么amp-social-share节点会失败,其他三个工作?

我也有这个在<head>甚至尽管我不知道这是必要的:

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

这是一些尚在建设中?

回答

1

看起来您使用的是属性归因,而不是数据归因。

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

本实施例显示,指定归属作为元素属性。

+0

哇,谢谢!我不能相信我错过了这一点。 – aproximation

+1

我正在使用这个页面,我发誓它只是归属地址=“12344”,而没有任何HTML5数据......之前的东西,但现在它显示了你所引用的内容。 https://www.ampproject.org/docs/reference/extended/amp-social-share.html为了安全起见,我将使用文档的github版本作为参考。再次感谢! – aproximation