视频会议集成进开心网小应用
今天用了半个小时将视频会议集成进了开心网(人人网)中,其实做的工作很简单:
String sessionKey=request.getParameter("xn_sig_session_key"); if(sessionKey==null) { String url="http://app.renren.com/apps/tos.do?v=1.0&api_key="+Config.apiKey+"&next=http://apps.renren.com/openmeetings/"; response.sendRedirect(url); return; } XiaoneiRestClient client = new XiaoneiRestClient(Config.apiKey,Config.secret,sessionKey); int uid=client.users_getLoggedInUser(); String uname = ""; try{ EnumSet<ProfileField> enumFields = EnumSet.of(ProfileField.NAME, ProfileField.HOMETOWN_LOCATION,ProfileField.BIRTHDAY, ProfileField.HEADURL,ProfileField.MAINURL, ProfileField.SEX,ProfileField.TINYURL, ProfileField.UNIVERSITY_HISTORY, ProfileField.WORK_HISTORY); Document doc = client.users_getInfo(uid, enumFields); System.out.println(doc.toString()); UsersGetInfoResponse loggedUserGetInfoRes = (UsersGetInfoResponse) client.getResponsePOJO(); List<User> lu=loggedUserGetInfoRes.getUser(); if(lu!=null){ for(User u:lu) { uname = u.getName(); } } }catch(Exception e) { out.println("ERROR:"+e.toString()); e.printStackTrace(); }?