iphone url wrapper , convert large link to small link
Posted on Monday, April 18, 2011
|
No Comments
First you need the following class to perform this operation
download it , this is open source
After download you need to signup http://bit.ly
after signup get you API key ,
then use your login name and API below method.
#import "MKBitlyHelper.h"
-(NSString *)ShortToLong:(NSString *)inputURL {
NSLog(@"%@",inputURL);
MKBitlyHelper *bitlyHelper = [[MKBitlyHelper alloc] initWithLoginName:@"login name" andAPIKey:@"API KEY INSERT HERE"];
NSString *shortURL = [bitlyHelper shortenURL:inputURL];
NSLog(@"return string %@",shortURL);
return shortURL;
}