偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

iOS應(yīng)用開(kāi)發(fā)之Twitter開(kāi)發(fā)代碼

移動(dòng)開(kāi)發(fā) iOS
iOS應(yīng)用開(kāi)發(fā)中的Twitter開(kāi)發(fā)代碼是本文要介紹的內(nèi)容,Twitter現(xiàn)在歐美地區(qū)極其火爆,先來(lái)看本文代碼。

iOS應(yīng)用開(kāi)發(fā)中的Twitter開(kāi)發(fā)代碼是本文要介紹的內(nèi)容,Twitter現(xiàn)在歐美地區(qū)極其火爆,如果各位開(kāi)發(fā)者想在應(yīng)用中增加Twitter功能,可以看一下許靖昕先生在博客中分享的代碼。

  1. - (void) postToTwitter  
  2. {  
  3.   // Since this will be launched in a separate thread, we need  
  4.   // an autorelease pool  
  5.   NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];  
  6.    
  7.   NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:  
  8.     [NSURL URLWithString:@"http://TWITTER_ACCOUNT:PASSWORD@twitter.com/statuses/update.xml"]   
  9.     cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:30.0];  
  10.    
  11.   // The text to post  
  12.   NSString *msg = @"testing";  
  13.    
  14.   // Set the HTTP request method  
  15.   [request setHTTPMethod:@"POST"];  
  16.    
  17.   [request setHTTPBody:[[NSString stringWithFormat:@"status=%@", msg]   
  18.     dataUsingEncoding:NSASCIIStringEncoding]];  
  19.    
  20.   NSURLResponse *response;  
  21.   NSError *error;  
  22.    
  23.   if ([NSURLConnection sendSynchronousRequest:request   
  24.       returningResponse:&response error:&error] != nil)  
  25.     NSLog(@"Posted to Twitter successfully.");  
  26.   else   
  27.     NSLog(@"Error posting to Twitter.");   
  28.    
  29.   // Release pool  
  30.   [pool release];   
  31. }    
  32. [NSThread detachNewThreadSelector:@selector(postToTwitter)  
  33.    toTarget:self withObject:nil]; 

小結(jié):iOS應(yīng)用開(kāi)發(fā)之Twitter開(kāi)發(fā)代碼的內(nèi)容介紹完了,希望通過(guò)本文的學(xué)習(xí)對(duì)你有所幫助!

責(zé)任編輯:zhaolei 來(lái)源: 互聯(lián)網(wǎng)
相關(guān)推薦

2011-07-21 16:19:30

iOS Twitter

2011-08-08 13:26:48

iOS開(kāi)發(fā) Twitter

2012-01-18 13:46:37

ARCiOS

2011-08-02 11:30:41

iOS開(kāi)發(fā) 郵件發(fā)送

2011-05-11 10:02:37

iOS

2014-07-21 14:49:35

iOSUILabel

2014-07-23 13:17:53

iOSUITextField

2011-07-28 15:11:23

iOS Objective-

2014-09-26 09:49:48

SwiftObjective-C

2021-01-26 19:13:15

iOS開(kāi)發(fā)文本編輯器Twitter

2011-07-08 14:58:16

iPhone Xcode iOS

2013-09-13 13:16:05

2017-02-15 09:25:36

iOS開(kāi)發(fā)MQTT

2011-08-02 11:07:42

iOS開(kāi)發(fā) UIWebView

2011-08-10 10:10:21

iPhoneUIPopoverCo

2024-04-09 09:24:13

2011-08-17 14:30:34

iOS開(kāi)發(fā)窗口

2012-02-02 10:14:14

2014-06-13 11:06:36

RoboVMiOS應(yīng)用

2013-01-11 15:06:13

iOS開(kāi)發(fā)移動(dòng)應(yīng)用iPhone
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)