I need t开发者_运维百科o get a short URL from a long one (that I made inside my app). I think that I already read about this, but I couldn't find it anymore here in SO.
Anyone has a piece of code or directions to point this out?
Best Regards
I usually use this one, from brandontreb of iCodeBlog
NSString *apiEndpoint = [NSString stringWithFormat:@"*API URL=*%@",link];
NSString *shortURL = [NSString stringWithContentsOfURL:[NSURL URLWithString:apiEndpoint]
encoding:NSASCIIStringEncoding
error:nil];
精彩评论