views:

128

answers:

2

There are a bunch of tutorials online about how to use xmlparsers or what not to bring an entire twitter feed into a UITableView. Thats not what I need. I only want ONE tweet. The most recent twitter update.

So, would some of you geniuses please show me in detail how to get my last (most recent) TWEET into an NSString in my iPhone app?

A: 

In short: exactly the same as all those tutorials that you've read except you pass the count parameter to the statuses/user_timeline REST method.

Stephen Darlington
A: 

Ohh, this is complicated, not so easy, I show you the steps:

  • Make the request to the api (synchronous or asynchonous)
  • Handle the Authentication Challenge for authenticated request
  • Get the data, call the parse method of the parser
  • Handle the delegation methods of the nsxmlparser
  • Manually handle the DidStartElement, DidFoundCharacters, DidEndElement to get the first status you want, assign the string value to a variable when it founds the characters.

That's all you need to do ;)

Good luck.

sfa