Saturday, December 18, 2010

Super fast way of integrating Twitter into your app

NSString *stringURL = @"twitter://post?message=check out this cool lifestyle app http://itunes.com/apps/wayoflife";


NSString *escapedStringURL = [stringURL stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]


NSURL *url = [NSURL URLWithString:escapedStringURL];


[[UIApplication sharedApplication] openURL:url];


----


Of course it requires that the user has Twitter installed on his/her phone to handle this URL.


No comments: