Characters problem .

9 views
Skip to first unread message

feras

unread,
Mar 28, 2010, 9:22:54 PM3/28/10
to bitly API
Hello,

When i try to shorten a link with "#,&" Character i got an exception
org.json.jsonexception : jsonobject ["http://www.google.com/search?
sourceid=chrome&ie=UTF-8&q=bitly"} not found

is there a way to handle them .

Thanks

Andrew Badera

unread,
Mar 28, 2010, 10:04:01 PM3/28/10
to bitl...@googlegroups.com
Are you encoding the values?

∞ Andy Badera
+1 518-641-1280 Google Voice
∞ This email is: [ ] bloggable [x] ask first [ ] private
∞ Google me: http://www.google.com/search?q=andrew%20badera

> --
> You are subscribed to the bit.ly API discussion group.
> To post, email to bitl...@googlegroups.com
> For more options, visit http://groups.google.com/group/bitly-api
>
> To unsubscribe from this group, send email to bitly-api+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
>

Jehiah

unread,
Mar 28, 2010, 10:05:51 PM3/28/10
to bitl...@googlegroups.com

Can you include some more information so someone on this list can help?

The complete http request and response to and from the bit.ly API
would be helpful, and as this sounds like it could be a client library
problem, details on the language and libraries you are using as well
as some code that reproduces the problem would also be useful.

--
Jehiah

Feras Al Natsheh

unread,
Mar 28, 2010, 10:59:50 PM3/28/10
to bitl...@googlegroups.com
Thanks for replays , 

this is a sample of code that works 
String shortUrl = bitly.getShortUrl("http://z"); //Works

 but if i add for example '&' or '%25' to the string it will produce exption :
- String shortUrl = bitly.getShortUrl("http://z%26"); // Exception 
- String shortUrl = bitly.getShortUrl("http://z&"); // Exception

the getShortUrl function form this Java class:
 
Thanks again .


Reply all
Reply to author
Forward
0 new messages