In my app the user may try a search for twitter users category wise (ex. film stars, sports persons, scientist etc.) and they may try this without login.
I need the result in xml, so that my app can parse it. Now the problem is I need the proper URL to perform the search in my app as follows:
HttpGet httpGet = new HttpGet(URL); ... and so on.
I need the proper URL.
I have the following URLs but either they need authentication or they are not working. I have searched Twitter developers site & stackoverflow, but get no relevant topic. URLs as follows:
-
http://api.twitter.com/1/users/search.xml?q=sports+persons
[ERROR: 07-05 16:25:43.276: W/DefaultRequestDirector(985): Authentication error: Unable to respond to any of these challenges: {oauth=WWW-Authenticate: OAuth realm=”http://api.twitter.com”}
07-05 16:25:43.286: E/TweetHandler(985): Could not authenticate you.
07-05 16:25:43.297: E/TweetHandler(985): /1/users/search.xml?q=sports+persons
07-05 16:25:43.297: E/TweetHandler(985):
] -
http://twitter.com/#!/search/users/sports+persons [not working]
Please help me to find the proper URL.
The answer is in the error message you’re getting – you need to be authenticated before searching.
Read the users/search documentation.
Your search URL is correct, but you will need to sign the request first.