Hi all,
I have been given a project to complete to gain the basic skills required for JSP. The app is a twitter search application. The user will type a search term into a textbox on index.jsp and hit search. An ajax call will then be made to another JSP file which calls java classes.
To search for tweets using the ATOM based search from the twitter api you must use the following url:
java - Twitter Search
In my class TwitterSearch I have the following skeleton code:
import java.util.ArrayList; public class TwitterSearch { //perform the web service call to twitter here returning an ArrayList of Twitter objects public ArrayList<Twitter> search(String query){ ArrayList<Twitter> tweets = new ArrayList<Twitter>(); //do service call - url returns all tweets for subject in XML format String url = "http://search.twitter.com/search.atom?q=query"; //get xml results and loop through them and put them into the list return tweets; } }
I'm stuck here and do not know how I am going to pass the query to the url and get the code to execute and run the http url.
Any help would be greatly appreciated!
Thanks,