【发布时间】:2011-03-30 11:28:46
【问题描述】:
我正在尝试获取 Twitter 提要,使用 search API 或仅使用 A standard JSON call 使用下面的代码,我只是得到一个空白页。我已经包含了所有正确的 jQuery 元素并使用 Flikr API 对其进行了测试(并更改了相关的模板部分)
<script>
$().ready(function() {
$(document).ajaxComplete(function() {
$("body").attribute({message: ""});
});
$.getJSON('http://twitter.com/status/user_timeline/ladygaga.json?count=10&callback=?', function(data) {
$.template("imageTmpl", $("#imagesTmpl"));
$.tmpl("imageTmpl", data, {
}).appendTo("#img_list");
});
});
</script>
</head>
<body>
<article id="img_list">
<script id="imagesTmpl" type="text/x-jquery-tmpl">
{{each items}}
{{if $index <= 4}}
${$text}
{{/if}}
{{/each}}
</script>
</article>
</body>
和想法?
【问题讨论】: