Reputation: 611
The twitter API has the method "statuses/update":
URL:
http://twitter.com/statuses/update.format
Formats:
xml, json, rss, atom
HTTP Method(s):
POST
Requires Authentication (about authentication):
true
API rate limited (about rate limiting):
false
Parameters:
* status. Required. The text of your status update. URL encode as necessary. Statuses over 140 characters will be forcibly truncated.
* in_reply_to_status_id. Optional. The ID of an existing status that the update is in reply to.
How would you call this method with Objective-C (iPhone)?
Upvotes: 1
Views: 6949
Reputation: 52565
Rather than implementing the API on your own, you might prefer to use a Cocoa framework that has already been written. There are a few, but the most commonly used (as far as I can tell) is MGTwitterEngine.
If you do want to do it by hand, you would use NSURLConnection
to download the data and then whatever you need to parse the output (NSXMLParser
for XML, a bit harder for JSON).
Upvotes: 8
Reputation: 79910
Look around for either twitter or json to objective-c libraries to communicate with twitter There's a JSON framework with iPhone SDK 2.2 as an example.
There's a iPhone dev course at Stanford on iTunes, they were working on Twitter app which included examples of how to get data from Twitter. Google around.
Upvotes: 5