我有以下代码,用于显示选定用户的推文列表。今天,它停止在此处显示用户列表的推文,并显示来自任何用户推文的推文,其中包含我在参数中设置的查询。 Twitter API 是否有我不知道的更新?
jQuery(function ($) {
$(".tweet").tweet({
username: ['user1', 'user2', 'user3'],
page: 1,
avatar_size: 32,
count: 9000,
query: "@mysearchterm OR #mysearchterm",
loading_text: "loading ..."
}).bind("loaded", function () {
var ul = $(this).find(".tweet_list");
var ticker = function () {
setTimeout(function () {
ul.find('li:first').fadeIn("fast").animate({
marginTop: '70px'
}, 500, function () {
$(this).detach().hide().appendTo(ul).fadeIn("fast").removeAttr('style');
});
ticker();
}, 5500);
};
ticker();
});
});
});
既不可信也不官方,但既然你根本没有答案......
我假设您正在使用来自seaofclouds的插件jquery.tweet.js(推特.seaofclouds.com/ http://tweet.seaofclouds.com/ or https://github.com/seaofclouds/tweet https://github.com/seaofclouds/tweet).
由于非常旧的提交(2010 年 2 月 6 日),如果您设置查询选项,则用户名选项将被忽略(请参阅中的函数 build_api_urljquery.tweet.js https://github.com/seaofclouds/tweet/blob/master/tweet/jquery.tweet.js#L145)。要执行您想要的操作,您需要将用户附加到查询字符串,例如
query: "@mysearchterm OR #mysearchterm OR from:user1 OR from:user2 OR from:user3"
看到这个JSFiddle http://jsfiddle.net/aalmeida/pDz5P/2/.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)