更改Twitter API?鸣叫用户列表停止工作 [英] Change in Twitter API? tweet user list stopped working
问题描述
我有以下代码用来显示来自选定用户的推文列表.今天,它停止在此处显示用户列表的推文,并显示任何用户推文中的推文,其中包括我在参数中设置的查询.是否有我不知道的Twitter API更新?
I have the following code I was using to display a list of tweets from select users. Today it stopped showing tweets for the user list here, and is showing tweets from any user's tweet that include the query I set in the parameters. Has there been an update to Twitter API that I am not aware of?
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( tweet.seaofclouds.com/或 https://github.com/seaofclouds/tweet ).
由于提交非常老(2010年2月6日),因此如果您设置查询选项,则将忽略username选项(请参见
Neither credible nor official, but since you have no answers at all...
I assume that you are using the plugin jquery.tweet.js from seaofclouds (tweet.seaofclouds.com/ or https://github.com/seaofclouds/tweet).
Since a very old commit (Feb 06, 2010), the username option is ignored if you set the query option (see the function build_api_url in jquery.tweet.js). To do what you want you need to append the users to the query string, something like
query: "@mysearchterm OR #mysearchterm OR from:user1 OR from:user2 OR from:user3"
请参见 JSFiddle .
这篇关于更改Twitter API?鸣叫用户列表停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!