Example usage for twitter4j User getFriendsCount

List of usage examples for twitter4j User getFriendsCount

Introduction

In this page you can find the example usage for twitter4j User getFriendsCount.

Prototype

int getFriendsCount();

Source Link

Document

Returns the number of users the user follows (AKA "followings")

Usage

From source file:org.getlantern.firetweet.model.ParcelableUser.java

License:Open Source License

public ParcelableUser(final User user, final long account_id, final long position) {
    this.position = position;
    this.account_id = account_id;
    final URLEntity[] urls_url_entities = user.getURLEntities();
    id = user.getId();/* w w  w  .  j  av  a  2s .  c o  m*/
    created_at = user.getCreatedAt().getTime();
    is_protected = user.isProtected();
    is_verified = user.isVerified();
    name = user.getName();
    screen_name = user.getScreenName();
    description_plain = user.getDescription();
    description_html = TwitterContentUtils.formatUserDescription(user);
    description_expanded = TwitterContentUtils.formatExpandedUserDescription(user);
    description_unescaped = HtmlEscapeHelper.toPlainText(description_html);
    location = user.getLocation();
    profile_image_url = user.getProfileImageUrlHttps();
    profile_banner_url = user.getProfileBannerImageUrl();
    url = user.getURL();
    url_expanded = url != null && urls_url_entities != null && urls_url_entities.length > 0
            ? urls_url_entities[0].getExpandedURL()
            : null;
    is_follow_request_sent = user.isFollowRequestSent();
    followers_count = user.getFollowersCount();
    friends_count = user.getFriendsCount();
    statuses_count = user.getStatusesCount();
    favorites_count = user.getFavouritesCount();
    listed_count = user.getListedCount();
    is_following = user.isFollowing();
    background_color = ParseUtils.parseColor("#" + user.getProfileBackgroundColor(), 0);
    link_color = ParseUtils.parseColor("#" + user.getProfileLinkColor(), 0);
    text_color = ParseUtils.parseColor("#" + user.getProfileTextColor(), 0);
    is_cache = false;
    is_basic = false;
}

From source file:org.getlantern.firetweet.util.ContentValuesCreator.java

License:Open Source License

public static ContentValues createCachedUser(final User user) {
    if (user == null || user.getId() <= 0)
        return null;
    final String profile_image_url = user.getProfileImageUrlHttps();
    final String url = user.getURL();
    final URLEntity[] urls = user.getURLEntities();
    final ContentValues values = new ContentValues();
    values.put(CachedUsers.USER_ID, user.getId());
    values.put(CachedUsers.NAME, user.getName());
    values.put(CachedUsers.SCREEN_NAME, user.getScreenName());
    values.put(CachedUsers.PROFILE_IMAGE_URL, profile_image_url);
    values.put(CachedUsers.PROFILE_BANNER_URL, user.getProfileBannerImageUrl());
    values.put(CachedUsers.CREATED_AT, user.getCreatedAt().getTime());
    values.put(CachedUsers.IS_PROTECTED, user.isProtected());
    values.put(CachedUsers.IS_VERIFIED, user.isVerified());
    values.put(CachedUsers.IS_FOLLOWING, user.isFollowing());
    values.put(CachedUsers.FAVORITES_COUNT, user.getFavouritesCount());
    values.put(CachedUsers.FOLLOWERS_COUNT, user.getFollowersCount());
    values.put(CachedUsers.FRIENDS_COUNT, user.getFriendsCount());
    values.put(CachedUsers.STATUSES_COUNT, user.getStatusesCount());
    values.put(CachedUsers.LISTED_COUNT, user.getListedCount());
    values.put(CachedUsers.LOCATION, user.getLocation());
    values.put(CachedUsers.DESCRIPTION_PLAIN, user.getDescription());
    values.put(CachedUsers.DESCRIPTION_HTML, TwitterContentUtils.formatUserDescription(user));
    values.put(CachedUsers.DESCRIPTION_EXPANDED, TwitterContentUtils.formatExpandedUserDescription(user));
    values.put(CachedUsers.URL, url);
    if (url != null && urls != null && urls.length > 0) {
        values.put(CachedUsers.URL_EXPANDED, urls[0].getExpandedURL());
    }// w w  w  . j  a va2  s  . c om
    values.put(CachedUsers.BACKGROUND_COLOR, ParseUtils.parseColor("#" + user.getProfileBackgroundColor(), 0));
    values.put(CachedUsers.LINK_COLOR, ParseUtils.parseColor("#" + user.getProfileLinkColor(), 0));
    values.put(CachedUsers.TEXT_COLOR, ParseUtils.parseColor("#" + user.getProfileTextColor(), 0));
    return values;
}

From source file:org.mariotaku.twidere.model.ParcelableUser.java

License:Open Source License

public ParcelableUser(final User user, final long account_id, final long position) {
    this.position = position;
    this.account_id = account_id;
    final URLEntity[] urls_url_entities = user.getURLEntities();
    id = user.getId();/*from www . j av  a  2 s. co m*/
    created_at = user.getCreatedAt().getTime();
    is_protected = user.isProtected();
    is_verified = user.isVerified();
    name = user.getName();
    screen_name = user.getScreenName();
    description_plain = user.getDescription();
    description_html = TwitterContentUtils.formatUserDescription(user);
    description_expanded = TwitterContentUtils.formatExpandedUserDescription(user);
    description_unescaped = HtmlEscapeHelper.toPlainText(description_html);
    location = user.getLocation();
    profile_image_url = user.getProfileImageUrlHttps();
    profile_banner_url = user.getProfileBannerImageUrl();
    url = user.getURL();
    url_expanded = url != null && urls_url_entities != null && urls_url_entities.length > 0
            ? urls_url_entities[0].getExpandedURL()
            : null;
    is_follow_request_sent = user.isFollowRequestSent();
    followers_count = user.getFollowersCount();
    friends_count = user.getFriendsCount();
    statuses_count = user.getStatusesCount();
    favorites_count = user.getFavouritesCount();
    listed_count = user.getListedCount();
    media_count = user.getMediaCount();
    is_following = user.isFollowing();
    background_color = ParseUtils.parseColor("#" + user.getProfileBackgroundColor(), 0);
    link_color = ParseUtils.parseColor("#" + user.getProfileLinkColor(), 0);
    text_color = ParseUtils.parseColor("#" + user.getProfileTextColor(), 0);
    is_cache = false;
    is_basic = false;
}

From source file:org.mariotaku.twidere.util.ContentValuesCreator.java

License:Open Source License

public static ContentValues createCachedUser(final User user) {
    if (user == null || user.getId() <= 0)
        return null;
    final String profile_image_url = user.getProfileImageUrlHttps();
    final String url = user.getURL();
    final URLEntity[] urls = user.getURLEntities();
    final ContentValues values = new ContentValues();
    values.put(CachedUsers.USER_ID, user.getId());
    values.put(CachedUsers.NAME, user.getName());
    values.put(CachedUsers.SCREEN_NAME, user.getScreenName());
    values.put(CachedUsers.PROFILE_IMAGE_URL, profile_image_url);
    values.put(CachedUsers.PROFILE_BANNER_URL, user.getProfileBannerImageUrl());
    values.put(CachedUsers.CREATED_AT, user.getCreatedAt().getTime());
    values.put(CachedUsers.IS_PROTECTED, user.isProtected());
    values.put(CachedUsers.IS_VERIFIED, user.isVerified());
    values.put(CachedUsers.IS_FOLLOWING, user.isFollowing());
    values.put(CachedUsers.FAVORITES_COUNT, user.getFavouritesCount());
    values.put(CachedUsers.FOLLOWERS_COUNT, user.getFollowersCount());
    values.put(CachedUsers.FRIENDS_COUNT, user.getFriendsCount());
    values.put(CachedUsers.STATUSES_COUNT, user.getStatusesCount());
    values.put(CachedUsers.LISTED_COUNT, user.getListedCount());
    values.put(CachedUsers.MEDIA_COUNT, user.getMediaCount());
    values.put(CachedUsers.LOCATION, user.getLocation());
    values.put(CachedUsers.DESCRIPTION_PLAIN, user.getDescription());
    values.put(CachedUsers.DESCRIPTION_HTML, TwitterContentUtils.formatUserDescription(user));
    values.put(CachedUsers.DESCRIPTION_EXPANDED, TwitterContentUtils.formatExpandedUserDescription(user));
    values.put(CachedUsers.URL, url);
    if (url != null && urls != null && urls.length > 0) {
        values.put(CachedUsers.URL_EXPANDED, urls[0].getExpandedURL());
    }//w  w  w  .  j av  a 2 s  . c  om
    values.put(CachedUsers.BACKGROUND_COLOR, ParseUtils.parseColor("#" + user.getProfileBackgroundColor(), 0));
    values.put(CachedUsers.LINK_COLOR, ParseUtils.parseColor("#" + user.getProfileLinkColor(), 0));
    values.put(CachedUsers.TEXT_COLOR, ParseUtils.parseColor("#" + user.getProfileTextColor(), 0));
    return values;
}

From source file:org.soluvas.buzz.twitter.TwitterUser.java

License:Apache License

/**
 * Clones attributes from Twitter4j's {@link User}.
 * @param src//  www . j av  a  2 s.co m
 */
public TwitterUser(User src, int revId, DateTime fetchTime) {
    super();
    this.revId = revId;
    this.fetchTime = fetchTime;
    id = src.getId();
    name = src.getName();
    screenName = src.getScreenName();
    location = src.getLocation();
    description = src.getDescription();
    contributorsEnabled = src.isContributorsEnabled();
    profileImageUrl = src.getProfileImageURL();
    biggerProfileImageUrl = src.getBiggerProfileImageURL();
    miniProfileImageUrl = src.getMiniProfileImageURL();
    originalProfileImageUrl = src.getOriginalProfileImageURL();
    profileImageUrlHttps = src.getProfileImageURLHttps();
    biggerProfileImageUrlHttps = src.getBiggerProfileImageURLHttps();
    miniProfileImageUrlHttps = src.getMiniProfileImageURLHttps();
    originalProfileImageUrlHttps = src.getOriginalProfileImageURLHttps();
    url = src.getURL();
    protectedState = src.isProtected();
    followersCount = src.getFollowersCount();
    status = src.getStatus();
    profileBackgroundColor = src.getProfileBackgroundColor();
    profileTextColor = src.getProfileTextColor();
    profileLinkColor = src.getProfileLinkColor();
    profileSidebarFillColor = src.getProfileSidebarFillColor();
    profileSidebarBorderColor = src.getProfileSidebarBorderColor();
    profileUseBackgroundImage = src.isProfileUseBackgroundImage();
    showAllInlineMedia = src.isShowAllInlineMedia();
    friendsCount = src.getFriendsCount();
    createdAt = new DateTime(src.getCreatedAt());
    favouritesCount = src.getFavouritesCount();
    utcOffset = src.getUtcOffset();
    timeZone = src.getTimeZone();
    profileBackgroundImageUrl = src.getProfileBackgroundImageURL();
    profileBackgroundImageUrlHttps = src.getProfileBackgroundImageUrlHttps();
    profileBannerUrl = src.getProfileBannerURL();
    profileBannerRetinaUrl = src.getProfileBannerRetinaURL();
    profileBannerIpadUrl = src.getProfileBannerIPadURL();
    profileBannerIpadRetinaUrl = src.getProfileBannerIPadRetinaURL();
    profileBannerMobileUrl = src.getProfileBannerMobileURL();
    profileBannerMobileRetinaUrl = src.getProfileBannerMobileRetinaURL();
    profileBackgroundTiled = src.isProfileBackgroundTiled();
    lang = src.getLang();
    statusesCount = src.getStatusesCount();
    geoEnabled = src.isGeoEnabled();
    verified = src.isVerified();
    translator = src.isTranslator();
    listedCount = src.getListedCount();
    followRequestSent = src.isFollowRequestSent();
}

From source file:org.tweetalib.android.model.TwitterUser.java

License:Apache License

public TwitterUser(User user) {
    mId = user.getId();//from  w w  w. j  ava  2s  .co m
    mScreenName = user.getScreenName();
    mName = user.getName();
    mDescription = user.getDescription();
    ArrayList<URLEntity> urlEntityArrayList = new ArrayList<URLEntity>();
    if (user.getDescriptionURLEntities() != null) {
        urlEntityArrayList = new ArrayList<URLEntity>(Arrays.asList(user.getDescriptionURLEntities()));
    }

    if (user.getURL() != null) {
        mUrl = user.getURL();
        urlEntityArrayList.add(user.getURLEntity());
    }

    mUrlEntities = urlEntityArrayList.toArray(new URLEntity[urlEntityArrayList.size()]);

    if (user.getLocation() != null && !user.getLocation().equals("")) {
        mLocation = user.getLocation();
    }

    if (user.getOriginalProfileImageURLHttps() != null) {
        mProfileImageUrlOriginal = user.getOriginalProfileImageURLHttps();
    }

    if (user.getBiggerProfileImageURLHttps() != null) {
        mProfileImageUrlBigger = user.getBiggerProfileImageURLHttps();
    }

    if (user.getProfileImageURLHttps() != null) {
        mProfileImageUrlNormal = user.getProfileImageURLHttps();
    }

    if (user.getMiniProfileImageURLHttps() != null) {
        mProfileImageUrlMini = user.getMiniProfileImageURLHttps();
    }

    mStatusesCount = user.getStatusesCount();
    mFriendsCount = user.getFriendsCount();
    mFollowersCount = user.getFollowersCount();
    mFavoritesCount = user.getFavouritesCount();
    mListedCount = user.getListedCount();
    mVerified = user.isVerified();
    mProtected = user.isProtected();
    mSocialNetType = SocialNetConstant.Type.Twitter;
}

From source file:org.xmlsh.twitter.util.TwitterWriter.java

License:BSD License

private void write(String localName, User user) throws XMLStreamException {
    startElement("user");
    attribute("created-at", user.getCreatedAt());
    attribute("description", user.getDescription());
    attribute("favorites-count", user.getFavouritesCount());
    user.getFollowersCount();/* w ww .j  ava2 s. c  o  m*/
    user.getFriendsCount();
    attribute("id", sanitizeID(user.getId()));
    attribute("lang", user.getLang());
    user.getListedCount();

    attribute("name", sanitizeUser(user.getName()));
    user.getProfileBackgroundColor();
    user.getProfileBackgroundImageUrl();
    user.getProfileBackgroundImageUrlHttps();
    user.getProfileImageURL();
    user.getProfileImageUrlHttps();
    user.getProfileLinkColor();
    user.getProfileSidebarBorderColor();
    user.getProfileTextColor();
    user.getRateLimitStatus();
    attribute("screen-name", sanitizeUser(user.getScreenName()));

    user.getStatusesCount();
    user.getTimeZone();
    user.getURL();
    user.getUtcOffset();
    write("location", user.getLocation());
    write("user-status", user.getStatus());
    endElement();

}

From source file:peoplesearch.FindFriendsAndFollowers.java

public void GetFollowersIDs() {
    try {/*  w  w w.j  ava  2  s. com*/
        // I need to pass the Person name and the TwitterID.
        //String targetname="Philip Bergkvist";
        Twitter twitter = new TwitterFactory().getInstance();
        long cursor = -1;
        IDs ids;

        ResponseList<User> users1 = null;
        ResponseList<User> users2 = null;
        System.out.println("Listing followers's ids.");

        GraphManager mgr = EmbeddedGraphManager.getInstance();

        mgr.init(new File("/usr/local/Cellar/neo4j/2.1.7/libexec/data/forlang1.db"));
        //mgr.addTwitterAccount(new TwitterAccountImpl(new Date(), "I am Studying", 13, 82, true,"Aalborg", "Philiptwoshoes", 2730631792L));
        List<TwitterAccount> twitteraccountslist;
        twitteraccountslist = null;
        twitteraccountslist = mgr.listTwitterAccounts();
        System.out.println("the number of twitter account in the neo4J DB is" + twitteraccountslist.size());
        for (TwitterAccount Twit : twitteraccountslist) {

            do {
                TwitterLimitWait tlw = new TwitterLimitWait();
                tlw.CheckLimit();

                if (0 < twitteraccountslist.size()) {
                    ids = twitter.getFollowersIDs(Twit.getScreenName(), cursor); //.getFollowersIDs(pep[0], cursor);
                    //ids = twitter.getFollowersIDs("Philiptwoshoes", cursor); //.getFollowersIDs(pep[0], cursor);
                    tlw.CheckLimit();
                    users1 = twitter.getFollowersList(Twit.getScreenName(), cursor);
                    tlw.CheckLimit();
                    users2 = twitter.getFriendsList(Twit.getScreenName(), cursor);

                } else {
                    tlw.CheckLimit();
                    ids = twitter.getFollowersIDs(cursor);

                }

                for (User user : users1) {
                    tlw.CheckLimit();
                    System.out.println("the follower called " + user.getName() + " with twitter handler "
                            + user.getScreenName());
                    String username = user.getName();
                    //mgr.addPerson(new PersonImpl(username));
                    Date Creation = user.getCreatedAt();
                    tlw.CheckLimit();
                    String descript = user.getDescription();
                    boolean empty1 = user.getDescription().isEmpty();
                    if (empty1 == true) {
                        descript = " ";
                    }
                    tlw.CheckLimit();
                    int followers = user.getFollowersCount();
                    tlw.CheckLimit();
                    int following = user.getFriendsCount();
                    boolean geo = user.isGeoEnabled();
                    String loc = user.getLocation();
                    boolean empty2 = user.getLocation().isEmpty();
                    if (empty2 == true) {
                        loc = " ";
                    }
                    String screenname = user.getScreenName();
                    boolean empty3 = user.getScreenName().isEmpty();
                    if (empty3 == true) {
                        screenname = " ";
                    }
                    tlw.CheckLimit();
                    long twitID = user.getId();

                    mgr.linkPersonToTwitterAccount(new PersonImpl(username), new TwitterAccountImpl(Creation,
                            descript, followers, following, geo, loc, screenname, twitID));
                    mgr.linkTwitterAccounts(new TwitterAccountImpl(Creation, descript, followers, following,
                            geo, loc, screenname, twitID), Twit);
                }

                System.out.println("The total number of followers is: " + users1.size());
                // the same procedure for the Following
                for (User user : users2) {
                    tlw.CheckLimit();
                    System.out.println("the following called " + user.getName() + " with twitter handler "
                            + user.getScreenName());
                    String username1 = user.getName();
                    //mgr.addPerson(new PersonImpl(username1));
                    Date Creation = user.getCreatedAt();
                    String descript = user.getDescription();
                    boolean empty1 = user.getDescription().isEmpty();
                    if (empty1 == true) {
                        descript = " ";
                    }
                    int followers = user.getFollowersCount();
                    int following = user.getFriendsCount();
                    boolean geo = user.isGeoEnabled();
                    String loc = user.getLocation();
                    boolean empty2 = user.getLocation().isEmpty();
                    if (empty2 == true) {
                        loc = " ";
                    }
                    String screenname = user.getScreenName();
                    tlw.CheckLimit();
                    boolean empty3 = user.getScreenName().isEmpty();
                    if (empty3 == true) {
                        screenname = " ";
                    }
                    tlw.CheckLimit();
                    long twitID = user.getId();
                    //mgr.addTwitterAccount(new TwitterAccountImpl(Creation,descript,followers,following,geo,loc,screenname,twitID));
                    mgr.linkPersonToTwitterAccount(new PersonImpl(username1), new TwitterAccountImpl(Creation,
                            descript, followers, following, geo, loc, screenname, twitID));
                    mgr.linkTwitterAccounts(Twit, new TwitterAccountImpl(Creation, descript, followers,
                            following, geo, loc, screenname, twitID));
                }
                System.out.println("The total number of friend is: " + users2.size());

                //}
            } while ((cursor = ids.getNextCursor()) != 0);

        }
        mgr.destroy(); // I have to check that the second iteration works fine, because i could not test that.
        System.exit(0);
    } catch (TwitterException te) {
        te.printStackTrace();
        System.out.println("Failed to get followers' ids: " + te.getMessage());
        System.exit(-1);
    }
}

From source file:peoplesearch.SearchTwitterUsers.java

public void SearchTwitterUsers() {
    int page = 1;
    int numberofpages = 0;
    Date TwitterAccCreatedAt = new Date();
    String TwitterAccDescr = " ";
    int TwitterFollowersCount = 0;
    int TwitterFriendsCount = 0;
    boolean TwitterGeoEnabled = false;
    String TwitterLocation = " ";
    String TwiterAccScrName = " ";
    long TwitterID = 0L;

    try {//from w  w  w . ja  va 2  s  .c  om

        Twitter twitter = new TwitterFactory().getInstance();
        ResponseList<User> users;
        List<Person> people = null;
        GraphManager mgr = EmbeddedGraphManager.getInstance();
        mgr.init(new File("/usr/local/Cellar/neo4j/2.1.7/libexec/data/forlang1.db"));

        mgr.addPerson(new PersonImpl("wgaura"));
        mgr.addPerson(new PersonImpl("Derek Mizak"));
        mgr.addPerson(new PersonImpl("Swiderek"));
        mgr.addPerson(new PersonImpl("Microsoft"));
        mgr.addPerson(new PersonImpl("BBC"));
        mgr.addPerson(new PersonImpl("RTE"));
        mgr.addPerson(new PersonImpl("CNBC"));
        mgr.addPerson(new PersonImpl("Poland"));
        mgr.addPerson(new PersonImpl("Ireland"));
        mgr.addPerson(new PersonImpl("Ergo"));

        people = mgr.listPeople();

        for (Person person : people) {
            do {
                TwitterLimitWait tlw = new TwitterLimitWait();
                tlw.CheckLimit();

                users = twitter.searchUsers(person.getName(), page);
                numberofpages = users.size() / 20;

                for (User user : users) {
                    if (user.getStatus() != null) {

                        TwitterAccCreatedAt = user.getCreatedAt();
                        if (!user.getDescription().isEmpty()) {
                            TwitterAccDescr = user.getDescription();
                        }
                        //if (user.getFollowersCount()>0) {TwitterFollowersCount=user.getFavouritesCount();}
                        //if  (user.getFriendsCount()>0) {TwitterFriendsCount=user.getFriendsCount();}
                        TwitterFollowersCount = user.getFollowersCount();
                        TwitterFriendsCount = user.getFriendsCount();
                        TwitterGeoEnabled = user.isGeoEnabled();
                        if (!user.getLocation().isEmpty()) {
                            TwitterLocation = user.getLocation();
                        }
                        TwiterAccScrName = user.getScreenName();
                        TwitterID = user.getId();

                        System.out.println("@" + user.getScreenName() + " - " + TwitterFollowersCount + " _ "
                                + TwitterFriendsCount);

                        //mgr.addTwitterAccount(new TwitterAccountImpl(TwitterAccCreatedAt,TwitterAccDescr,TwitterFollowersCount,TwitterFriendsCount,TwitterGeoEnabled,TwitterLocation,TwiterAccScrName,TwitterID));
                        mgr.linkPersonToTwitterAccount(person,
                                new TwitterAccountImpl(TwitterAccCreatedAt, TwitterAccDescr,
                                        TwitterFollowersCount, TwitterFriendsCount, TwitterGeoEnabled,
                                        TwitterLocation, TwiterAccScrName, TwitterID));

                        TwitterAccDescr = " ";
                        TwitterLocation = " ";
                        TwitterFollowersCount = 0;
                        TwitterFriendsCount = 0;

                        //numberofusers++;

                    } else {
                        // the user is protected
                        System.out.println("@" + user.getScreenName());
                    }
                }

                page++;
                //System.out.println(page);
            } while (users.size() != 0 && page < numberofpages);
        }
    } catch (Exception ex) {
        System.out.println(ex.getMessage());
    }
}

From source file:Principal.Tracker_Twitter.java

License:Minecraft Mod Public

public void guardarResultados_Twitter(List<ObjetoBuscar> lista, BD base, int contadorBase, int TokenIndice)
        throws NoSuchAlgorithmException, KeyManagementException {
    int nuevoContadorBase = 0;
    if (contadorBase >= lista.size()) {
        System.out.println("Termino en:" + contadorBase);
    } else {/*from  ww  w. ja  v a2 s  . c  om*/
        System.out.println("---------------------------------------------------------------------:P");

        TrustManager[] trustAllCerts = { new X509TrustManager() {
            public X509Certificate[] getAcceptedIssuers() {
                return null;
            }

            public void checkClientTrusted(X509Certificate[] certs, String authType) {
            }

            public void checkServerTrusted(X509Certificate[] certs, String authType) {
            }
        } };
        SSLContext sc = SSLContext.getInstance("SSL");

        sc.init(null, trustAllCerts, new SecureRandom());

        HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());

        HostnameVerifier allHostsValid = new HostnameVerifier() {
            public boolean verify(String hostname, SSLSession session) {
                return true;
            }
        };
        HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid);

        System.out.println("Token : " + TokenIndice);
        System.out.println(consumerKey[TokenIndice]);
        try {
            ConfigurationBuilder cb = new ConfigurationBuilder();
            cb.setOAuthConsumerKey(consumerKey[TokenIndice]);
            cb.setOAuthConsumerSecret(this.consumerSecret[TokenIndice]);
            cb.setOAuthAccessToken(this.token[TokenIndice]);
            cb.setOAuthAccessTokenSecret(this.tokenSecret[TokenIndice]);
            Twitter unauthenticatedTwitter = new TwitterFactory(cb.build()).getInstance();

            for (int numtTweets = contadorBase; numtTweets < contadorBase + 5; numtTweets++) {

                if (((ObjetoBuscar) lista.get(numtTweets)).getUrl().equals("")
                        || ((ObjetoBuscar) lista.get(numtTweets)).getUrl() == null) {

                } else {

                    System.out.println("Usuario:  " + ((ObjetoBuscar) lista.get(numtTweets)).getUrl());

                    String usuariosinArroba = ((ObjetoBuscar) lista.get(numtTweets)).getUrl().replace("@", "");

                    System.out.println("" + usuariosinArroba);

                    try {

                        User usuario = unauthenticatedTwitter.showUser(usuariosinArroba);
                        List<Status> ret = unauthenticatedTwitter.getRetweetsOfMe();
                        List<Status> favoritos = unauthenticatedTwitter.getFavorites();
                        Paging paging = new Paging(1, 1000);
                        ResponseList<Status> statuses = unauthenticatedTwitter.getUserTimeline(usuario.getId(),
                                paging);
                        System.out.println("Followers: " + usuario.getFollowersCount());
                        System.out.println("Yo sigo: " + usuario.getFriendsCount());
                        List<String> listaTweets = new ArrayList();
                        List<Long> ListaRettewts = new ArrayList();
                        List<Integer> ListaFavoritos = new ArrayList();
                        List<Integer> ListaMenciones = new ArrayList();
                        List<Date> ListaFecha = new ArrayList();
                        List<Long> ListaIds = new ArrayList();
                        for (Status sta : statuses) {
                            ListaIds.add(Long.valueOf(sta.getId()));
                            listaTweets.add(sta.getText());
                            ListaRettewts.add(Long.valueOf(Long.parseLong(sta.getRetweetCount() + "")));
                            ListaMenciones.add(Integer.valueOf(sta.getUserMentionEntities().length));
                            ListaFecha.add(sta.getCreatedAt());
                            ListaFavoritos.add(Integer.valueOf(sta.getFavoriteCount()));
                        }
                        for (int i = 0; i < listaTweets.size(); i++) {
                            base.guardarTrackTwitter_Log((Long) ListaIds.get(i),
                                    ((ObjetoBuscar) lista.get(numtTweets)).getUrl(),
                                    (String) listaTweets.get(i), (Date) ListaFecha.get(i),
                                    (Long) ListaRettewts.get(i), ((Integer) ListaFavoritos.get(i)).intValue(),
                                    ((Integer) ListaMenciones.get(i)).intValue());
                        }

                    } catch (Exception e) {
                        System.err.println("Entro al Try por :" + e);
                    }

                    nuevoContadorBase = numtTweets;
                }
            }
            System.out.println("Numero de Contador Base:" + nuevoContadorBase);
            guardarResultados_Twitter(lista, base, nuevoContadorBase + 1, TokenIndice + 1);
        } catch (NumberFormatException e) {
            System.err.println("Fallo por :" + e);
        }
    }
}