hi pals,
here i have the API key and Security key .... but am not able to create the session key values... i have attached my coding here...
<%
String username = request.getParameter("username");
String password = request.getParameter("password");
FriendsterClient fc = new FriendsterClient("sessionkey", "7c253b64f5f3aa1d84b7c825ab2327e8", "3cdebc2f794af44d173a9046d12775cc");
XPath xpath = XPathFactory.newInstance().newXPath();
int uid = 121665363;
try {
out.println("running");
String sToken = fc.getToken();
//String sSession = fc.getSession(sToken);
Document doc = fc.getUser(121665363);
String firstName = xpath.evaluate("/user_response/user/first_name", doc);
String lastName = xpath.evaluate("/user_response/user/last_name", doc);
out.println(firstName + " " + lastName);
List<Integer> friends = fc.getFriends(121665363);
Document doc1 = fc.getUsers(friends);
NodeList nl = (NodeList) xpath.evaluate("/user_response/user", doc1, XPathConstants.NODESET);
for (int i = 0; i < nl.getLength(); i++) {
out.println("profile url [" + i + "]: " + xpath.evaluate("url", nl.item(i)));
}
} catch (Exception e) {
out.println("coding error");
System.err.println(e);
}