1

Closed

The method getAllFriends can't retrieve the top 10 friends

description

since the source code of getAllFriends , you declare a local variable "offset" with initial value 10.
it should be 0.
for the same reason, i guess the getAllFans and the getAllFollowings will have the same issue.
 
    public user_infos getAllFriends(int user_id)
    {
        var offset = 10;  // <----- Here is the problem.
        var userInfos = new user_infos();
        var tempUserInfos = getFriends(user_id, offset);
        while (tempUserInfos.Count != 0)
        {
            offset += 10;
            userInfos.AddRange(tempUserInfos);
            tempUserInfos = getFriends(user_id, offset);
        }
        return userInfos;
    }
Closed Mar 31, 2010 at 2:53 PM by chhuang
has fixed

comments

chhuang wrote Mar 31, 2010 at 2:52 PM

fixed

wrote Mar 31, 2010 at 2:53 PM

wrote Feb 13, 2013 at 3:04 AM

wrote May 15, 2013 at 1:25 AM