我想从 inmobi 获得测试广告横幅。根据 inmobi Developer Wiki
http://developer.inmobi.com/wiki/index.php?title=JavaScript
这个脚本
<script type="text/javascript">
var inmobi_conf = {
siteid : "4028cba631d63df10131e1d3191d00cb",
slot : "15",
test: "true"
};
</script><script type="text/javascript" src="http://cf.cdn.inmobi.com/ad/inmobi.js"></script>
必须返回 320x50 的测试横幅,但它总是返回空横幅。 请帮忙。我究竟做错了什么?
最佳答案
您收到“无填充响应”。从您提供的链接:
For example, if a publisher faces an NFR (No-Fill Response) scenario, a callback is sent notifying that there is an NFR. The publisher can now take steps to address and blank real estate issue that was caused by non-availability of ads.
<div id="my-ad-slot">
<script type="text/javascript">
var inmobi_conf = {
siteid : "your site id",
slot : "slot number",
test: true,
onError : function(code) {
if(code == "nfr") {
document.getElementById("my-ad-slot").style.display = "none";
// do something else. call to other ad network or logic to display in-house ads, etc.
}
}
};
</script>
<script type="text/javascript" src="http://cf.cdn.inmobi.com/ad/inmobi.js"></script>
</div>
上述代码示例中,参数code在没有返回广告时会给出nfr。
关于javascript - inmobi javascript 返回空横幅,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19126212/