NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:
[NSURL URLWithString:
@"http://YOUR_TWITTER_USERNAME:YOUR_PASSWORD@twitter.com/status/update.xml"]
cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];
[theRequest setHTTPMethod:@"POST"];
[theRequest setHTTPBody:[[NSString stringWithFormat:@"status=%@", 
NSURLResponse *response;
NSError *error;
NSData *result = [NSURLConnection sendSynchronousRequest:theRequest
returningResponse:&response error:&error];
NSLog(@"%@", [[[NSString alloc] initWithData:result
encoding:NSASCIIStringEncoding] autorelease]);



'Object-C' 카테고리의 다른 글

테이블뷰 정렬  (0) 2010.10.23
키보드 사이즈 이벤트  (0) 2010.10.23
valueForKey vs objectForKey  (0) 2010.10.22
키보드 사라지게 하기  (0) 2010.10.22
NSNotificationCenter  (0) 2010.10.10

+ Recent posts