Amp html <;amp ad>;不显示的广告

Amp html <;amp ad>;不显示的广告,amp-html,Amp Html,我正在尝试为我自己的AMP广告服务。我有几周前还在工作的代码,但它神秘地停止了工作。我在这里附加了一个简单的例子: 我可以从Chrome开发者工具网络选项卡上看出,广告成功地调用了remote.html,它成功地获取了图片 然而,当我检查amp ad标签本身时,它是空的——甚至没有一个空的iframe。就好像它已经加载了iframe,正确地获取了所有内容,然后iframe就销毁了自己 救命啊 以下是页面代码: <!doctype html> <html amp lang="en

我正在尝试为我自己的AMP广告服务。我有几周前还在工作的代码,但它神秘地停止了工作。我在这里附加了一个简单的例子:

我可以从Chrome开发者工具网络选项卡上看出,广告成功地调用了remote.html,它成功地获取了图片

然而,当我检查amp ad标签本身时,它是空的——甚至没有一个空的iframe。就好像它已经加载了iframe,正确地获取了所有内容,然后iframe就销毁了自己

救命啊

以下是页面代码:

<!doctype html>
<html amp lang="en">
  <head>
    <meta charset="utf-8">
    <script async src="https://cdn.ampproject.org/v0.js"></script>
    <script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>
    <title>Hello, AMPs</title>
    <link rel="canonical" href="http://dk-imac.local" />
    <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
    <meta name="amp-3p-iframe-src" content="https://localbtk.com/remote.html">
    <script type="application/ld+json">
      {
        "@context": "http://schema.org",
        "@type": "NewsArticle",
        "headline": "Open-source framework for publishing content",
        "datePublished": "2015-10-07T12:02:41Z",
        "image": [
          "logo.jpg"
        ]
      }
    </script>
    <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
  </head>
  <body>
    <h1>Welcome to the mobile web</h1>
    <amp-ad width=728 height=90 type="_ping_" data-fkslot='1'>
    </amp-ad>
  </body>
</html> 

你好,AMPs
{
“@context”:”http://schema.org",
“@type”:“新闻文章”,
“标题”:“发布内容的开源框架”,
“发布日期”:“2015-10-07T12:02:41Z”,
“图像”:[
“logo.jpg”
]
}
body{-webkit动画:-amp start 8s steps(1,end)0s1 normal tweet;-moz动画:-amp start 8s steps(1,end)0s1 normal tweet;-ms动画:-amp start 8s steps(1,end)0s1 normal tweet}@-webkit关键帧-amp start{从{可见性:隐藏}到{可见性:可见}}@-moz关键帧-amp start{from{可见性:隐藏}
欢迎来到移动网络
)。有一个答案,但并不令人满意,那就是这是预期的行为,
\u ping\u
仅用于测试。然而,他们没有就我应该做什么不同提出任何建议,这让我不得不为一个新的“广告网络”(这实际上只是我自己的网站)创建代码这是我唯一的选择。这将是一个很大的工作,感觉真的太过分了,但这就是我现在的处境

顺便说一句,这里有一个例子:

顺便问一下,CDN上有旧版本的列表吗?目前,CDN上的文件名似乎没有变化(和),但如果我理解正确,开发人员文档表明代码每周四都在更改。能否提供一些包含代码的示例AMP URL?这将使人们更容易调试问题。
<!doctype html>
<head>
<title>Remote PBL</title>
<meta charset="utf-8">
<meta name="robots" content="noindex">
<script>
(function() {
var v = location.search.substr(1);
if (!(/^\d+(-canary)?$/.test(v))) return;
var u = 'https://3p.ampproject.net/'+encodeURIComponent(v)+'/f.js';
document.write('<script'+' src="'+encodeURI(u)+'"><'+'/script>');
})();
</script>
</head>
<body style="margin:0">
<div id="c" style="position:absolute;top:0;left:0;bottom:0;right:0;">
<script>
    // @todo Add in proper Google Analytics
    var trackJavascriptLink = function(url) {
        window.open(url, '_blank');
    };
    draw3p(function(config){    // Can add a second parameter "done" which is a function
        var x = new XMLHttpRequest();
        x.onreadystatechange = function(){
            if (this.readyState == 4 && this.status == 200) {
                document.write("<div style='width:" + (config.width - 16) + "px;height:" + (config.height - 16) + "px'>" + 
                        this.responseText + "</div>");
            }
        };
        x.open("GET", "https://localbtk.com/handler/amp-page/fetch-slot/" + config.fkslot + "/" + (config.width - 16) + "/" +
                (config.height - 16), true);
        x.send();
    },
      // List of expected amp-ad types.
      ['_ping_'],
      // List of hostnames that are allowed to embed this change.
      // Please also use ALLOW-FROM X-Frame-Options to get security in
      // browsers that do not support location.ancestorOrigins.
      ['dk-imac.local']); // My own has a few others also.
</script>
</div>
<script>if (window.docEndCallback) window.docEndCallback()</script>
</body>
</html>