Twitter SDK for objective-c [duplicate]
Possible Duplicates:
Twitter SDK on iOS with standard UI Send a tweet from iPhone app Is there an iPhone SDK API for twitter?
Is there a twitter SDK available for iOS? I checked their website but i can't find anything. I know that iOS 5 will have integrated twitter support, but what about ios4?
Thanks
See http://dev.twitter.com/pages/libraries#objectivec for some Objective-C client libraries. I haven't actually used any of these myself, but from what I hear the first option (MGTwitterEngine) does the job nicely.
Alternatively, you can find a tutorial for DIY from scratch here (although, it is a bit dated, no OAuth for example).
In iOS4, you can use NSURLConnection instances to talk to the Twitter API, and decode the returned JSON or XML. There are definitely good JSON decoder classes online for Objective-C, but many of the (pre-built) 'Twitter' classes, which wrap the API callbacks in a nice class, available online are now outdated as they are not maintained. If I were to recommend one, it would be the MGTwitterEngine, as this is maintained by Matt Gemmell, a prolific and reliable iOS developer - who obviously cares for the platform. He works on Twitterrific, which uses the MGTwitterEngine class, for instance; the likelihood of it being maintained is quite high.
精彩评论