开发者

How to get short URL inside my iPhone app?

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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜