views:

403

answers:

2

Hey guys, simple query

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 RSS Feed?

Cool, cheers

+1  A: 

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.

pix0r
good call on the cache there
andy
+2  A: 

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.

Rafe Lavelle
Hmmm...even though on the page here, those "http://is.gd/4fZBo" links actually become hyperlinked, they don't in (answer) edit mode, and they don't in the source of the RSS feed
Rafe Lavelle
The Twitter API does return the text of the tweets as just plain text - apparently converting the @ names and links to links is up to the developer, so there's not advantage over the RSS in that respect.
Alex JL
Good info, thanks. I haven't tried the API yet, and now I'm amazed that they lose that information. What is their reason for that I wonder?
Rafe Lavelle

related questions