开发者

How to get short URL inside my iPhone app?

开发者 https://www.devze.com 2022-12-25 13:00 出处:网络
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.

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

精彩评论

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

关注公众号