开发者

Should I use the Twitter API or just the RSS Feed?

Company I work for has set up a twitter handle, and on our website we're just gonna display like, the last 2 tweets.

As we're only displaying, is there any advantage of using the API over just the RSS Feed from our profile page?

I know the API has a number of calls restriction...does the RS开发者_C百科S Feed?

Cool, cheers


The RSS feed is actually part of the API, so you should be fine as long as you're able to parse RSS. The RSS feed is public for public profiles and does not require an API key.

More info: Twitter REST API Method: statuses user_timeline

Assuming you're pulling this down on the server side, make sure you cache the feed so you don't pull one down for every page load.


Looking at an individual entry from the RSS feed, you get the entire tweet, the time, and the Url of the tweet. e.g.

BadAstronomer: @neito No, Randi's alive & still annoying frauds. A Fark link made it look like he'd shuffled off this mortal coil: http://is.gd/4fZBo
Tuesday, 13 October 2009 8:44 AM
BadAstronomer: @neito No, Randi's alive & still annoying frauds. A Fark link made it look like he'd shuffled off this mortal coil: http://is.gd/4fZBo

Note that any links within the tweet don't retain their linked nature. Same with any "@replies" and #hashtags.

In short, if there is an ability within the API to have the original tweet retain it's original links, then that's certainly worth the extra effort, I think, because otherwise you either forfeit the hyperlinked richness of the original tweet, or you have to parse and relink links, replies and hashtags which could be onerous.

I guess it depends on the sort of tweets your company will be making. If they are plain tweets with no links, then I can't see an advantage to using the API. If, however, they expect to use the normal link-grammar of Twitter, I'd be using the API.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜