//TWITTER BLACK MAGIC NSMutableURLRequest *theRequest =[NSMutableURLRequest requestWithURL:[NSURL URLWithString : @"http://YOUR_TWITTER_UESERNAME:YOUR_TWITTER_PASSWORD@twitter.com/statuses/update.xml"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];
[theRequest setHTTPMethod:@"POST"];
NSURLResponse* response;[theRequest setHTTPBody:[[NSString stringWithFormat:@"status=%@",theMessage] dataUseEncoding:NSASCIIStringEncoding]];
NSError*error;
NSData result = [NSURLConnection sendSynchronousRequest:theRequest
returningResponse:&response error:&error];
NSLog(@"%@",[[[NSString alloc]initWithData:result
encoding:NSASCIIStringEncoding]autorelease]);
//END TWITTER BLACK MAGIC
如何发送信息到Twitter上面
最新推荐文章于 2024-07-05 11:30:02 发布