Closed GoogleCodeExporter closed 8 years ago
Can you describe what api call you are making, and how you are making that
call? (an example would be best)
Are you encoding the maps.yahoo.com url properly to escape the characters like
'?' and '&' ?
Original comment by jehiah
on 13 Apr 2010 at 1:40
I am trying to do following thing
http://api.bit.ly/v3/shorten?&login=ogoing&apiKey=R_a3556877b23a182468abf8690cb0
8a4b&uri=http://maps.yahoo.com/py/maps.py?pyt=tmap&addr=2801+ocean+park+blvd&cit
y=santa+monica&state=ca&csz=santa+monica,+ca+90%20405-5200&slt=34.018220&sln&for
mat=xml
it will give me
<response>
<status_code>200</status_code>
<status_txt>OK</status_txt>
−
<data>
<url>http://bit.ly/92j9lg</url>
<hash>92j9lg</hash>
<global_hash>cUg0xK</global_hash>
<long_url>http://maps.yahoo.com/py/maps.py?pyt=tmap</long_url>
<new_hash>0</new_hash>
</data>
</response>
why long url is http://maps.yahoo.com/py/maps.py?pyt=tmap ?
its successfully work on bit.ly then why its not working on api?
is this because of long number of characters are more ? then why don't we
change the
perimeter string to long string? (just thought)
Thanks
Shankar Gidwani
Original comment by shaan.gi...@gmail.com
on 14 Apr 2010 at 5:15
As mentioned in my previous comment, and in the bit.ly api documentation you
need to encode the url you
would like to shorten when constructing your api request.
This means that to shorten the example you listed, you should be inserting the
encoded url in your api request
>
http%3A%2F%2Fmaps.yahoo.com%2Fpy%2Fmaps.py%3Fpyt%3Dtmap%26addr%3D2801%2Bocean%2B
park%2Bblvd%2
6city%3Dsanta%2Bmonica%26state%3Dca%26csz%3Dsanta%2Bmonica%2C%2Bca%2B90%2520405-
5200%26slt%3D34.018220%26sln
not
> http://maps.yahoo.com/py/maps.py?
pyt=tmap&addr=2801+ocean+park+blvd&city=santa+monica&state=ca&csz=santa+monica,+
ca+90%20405-
5200&slt=34.018220&sln
For more information about URI encoding, see the notes listed on the api
documentation
http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/shorten
Original comment by jehiah
on 14 Apr 2010 at 5:29
Original issue reported on code.google.com by
shaan.gi...@gmail.com
on 13 Apr 2010 at 9:19