Examples of FacebookContact


Examples of com.theqsync.dao.entity.FacebookContact

        String sessionKey = (String) session
            .getAttribute(FacebookUtil.SESSION_KEY);
        FacebookJsonRestClient client = new FacebookJsonRestClient(
            FacebookUtil.API_KEY, FacebookUtil.SECRET_KEY,
            sessionKey);
        FacebookContact facebookUser = null;
        Long uid = client.users_getLoggedInUser();
        if (uid != null) {
          facebookUser = new FacebookContact();
          facebookUser.setUserId(uid);

          /*
           * json ile
           */
          Vector<Long> userIds = new Vector<Long>();
          /*
           * Kendi Bilgilerinide alcaz
           */
          userIds.add(uid);

          /*
           * Kullan�c� Arkadas idlerini alcaz
           */
          JSONArray friendsId = client.friends_get();
          for (int i = 0; i < friendsId.length(); i++) {
            Long obje = friendsId.getLong(i);
            userIds.add(obje);
          }

          /*
           * Ki�i bilgilerini al
           */
          JSONArray friendsDetail = client.users_getInfo(userIds,
              FacebookUtil.fields);
          List<FacebookContact> contacts = new ArrayList<FacebookContact>();
          for (int i = 0; i < friendsDetail.length(); i++) {
            JSONObject obje = friendsDetail.getJSONObject(i);
            FacebookContact contact = new FacebookContact();
            contact.createFromJSONObject(obje);
            contacts.add(contact);
          }
          FacebookBean iBean = (FacebookBean) getBean("facebookBean");
          iBean.setFacebookContacts(contacts);
        } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.