google.load("feeds", "1");
function OnLoad() {
// Create a feed control
var feedControl = new google.feeds.FeedControl();
// Add 1 feeds.
feedControl.addFeed("http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=SteveMartinToGo&count=2");
// Draw it.
feedControl.draw(document.getElementById("twitter_content"));
}
google.setOnLoadCallback(OnLoad);
我正在使用Google FeedControl API从RSS中呈现推文。
这可能不是呈现推文的最佳方式,但Twitter的REST API有一个速率限制,并且在被击中几次后超时,这非常令人讨厌。
这似乎非常可靠,它只是一个RSS提要解析器,除了谷歌API剥离链接并使它们成为纯文本。如果可能的话,我想将它们转换回链接。