I am using “search/tweets.json” api.
I get result for simple character like https://api.twitter.com/1.1/search/tweets.json?q=%23Test
but if i add special chratcter like https://api.twitter.com/1.1/search/tweets.json?q=%23test@#*
Then api gives null response.
Please suggest what is wrong in api call.
Waiting for the response.
Thanks & Regards Twitter user
encode the special characters, for example in php it’d be:
urlencode("#Test@#*")
I’m not sure if that’s the only issue but it’s a good starting point.
Hello DanielCHood,
Can you please suggest how you encode string???
I have add 1 line while sending api request,
Before calling api, Change search Teg in URLEncode,
URLEncoder.encode(“Search String”, “UTF8”);
That’s it, Now twitter gives search result in special character also.
The line of code I provided was for php. You didn’t specify the language you were using before.
Judging by your last post, can I assume you fixed it by encoding it or is it still not working after you used the
line?
I am working on android application so the language used is JAVA,
Twitter api gives proper response after encoding the search string.