1

I want the web service in json OR in xml which gives the shorten url in response.

I have to implement the web service in iPhone application.

Let me know of any web services which do the following:

If I give as the request

Then it will return http://goo.gl/fbsS in response.

I found this: https://www.googleapis.com/urlshortener/v1/url?shortUrl=http://goo.gl/fbsS

But this is actually the reverse of what I want, in that I have to pass the shortened url and it gives the long url in response

Like this:-

{
 "kind": "urlshortener#url",
 "id": "http://goo.gl/fbsS",
 "longUrl": "http://www.google.com/",
 "status": "OK"
}
Gray
  • 7,050
  • 2
  • 29
  • 52
ios developer
  • 3,363
  • 3
  • 51
  • 111

2 Answers2

3

try TinyURL:

http://json-tinyurl.appspot.com/

obj c / iphone related question

Community
  • 1
  • 1
ader
  • 5,403
  • 1
  • 21
  • 26
0

You can use this to get the shorten url:

http://api.bit.ly/v3/shorten?login=XXXX&apikey=XXXXXlongUrl=http://www.stackoverflow.com&format=xml

n00begon
  • 3,503
  • 3
  • 29
  • 42
Jane
  • 288
  • 1
  • 3
  • 18