J'utilise sur mon application iphone ce code mais je ne peux pas voir le post sur mon twitter. Je ne reçois pas d'erreur.twitter code iphone ne fonctionne pas
NSMutableURLRequest * Demande = [NSMutableURLRequest requestWithURL: [NSURL URLWithString: @ "http://username:[email protected]/statuses/update.xml"] cachePolicy: NSURLRequestUseProtocolCachePolicy timeoutInterval: 15.0]; // Le texte à publier NSString * msg = @ "testing";
// Set the HTTP request method
[request setHTTPMethod:@"POST"];
[request setHTTPBody:[[NSString stringWithFormat:@"status=%@", msg]
dataUsingEncoding:NSASCIIStringEncoding]];
NSURLResponse *response;
NSError *error;
if ([NSURLConnection sendSynchronousRequest:request
returningResponse:&response error:&error] != nil)
NSLog(@"Your Poem posted to Twitter successfully.");
else
NSLog(@"Could not post to Twitter");
Quelqu'un peut-il me dire ce qui ne va pas?