Friends list of a friend using Twitter4J

前端 未结 7 1021
旧时难觅i
旧时难觅i 2021-01-12 23:40

How can I obtain the friends list of a friend or follower using Twitter4J?

Using getFriendsId(), I\'m only able to retrieve the friend\'s/follower\'s list of that cu

7条回答
  •  [愿得一人]
    2021-01-13 00:31

    You only need to do this:

    Twitter twitter = mTwitterApp.getTwitterInstance();
    long cursor = -1;
    List users=twitter.getFriendsList(mTwitterApp.getUserID(), cursor);
    

    Here users is a list users who are your friends(you are following them). mTwitterApp.getUserID() is your login useris which is a long value.

提交回复
热议问题