I recently started using Ben Gottlieb's Twitter-OAuth-iPhone class to post status updates in app. I have successfully done so, when executed on the application's main thread. But, when I throw it in a "NSThread detachNewThreadSelector" the post never makes it to twitter. It processes fine and I get a proper [connection identifier], but the results never make it on twitter. Any idea how I can get this to run in a thread without bringing it back to the main thread?
Code added Tweet method
-(void)tweet{
if([_engine isAuthorized]){
[_engine sendUpdate:@"Tweeting"];
}
}
Doesn't work:
[NSThread detachNewThreadSelector:@selector(tweet) toTarget:self withObject:nil];
Does work (from main app):
[self tweet];
Does work (from within a thread):
[self performSelectorOnMainThread:@selector(tweet) withObject:nil waitUntilDone:NO];