如何获取完整的关注者列表 [英] How to get the complete list of followers

查看:31
本文介绍了如何获取完整的关注者列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

tweetsharp 库 的最新版本用于 twitter api,我试图获得所有特定用户的关注者.但我只能用这种方法获得最后 100 个关注者:

Using the last version of the tweetsharp library for the twitter api, i am trying to get all the followers for a specific user. But i can only get the last 100 followers with this method:

IEnumerable<TwitterUser> f_followers = service.ListFollowersOf(user_id);

此方法有第二个参数,即长光标",但我不知道如何使用它.我试图将它用作偏移量,但它不起作用.我认为在每个请求之后,我都需要一个 cursorNext,我可以将其用于下一个请求.

This method has a second parameter which is "long cursor", but i don't know how to use it. I tried to use it as an offset but it does not work. I presume that after each request, i need a cursorNext that i can use for the next request.

IEnumerable<TwitterUser> f_followers = service.ListFollowersOf(user_id, cursorNext);

感谢您的帮助.

推荐答案

我完全不知道 tweetsharp,但基于 以下链接,您可以尝试以下操作:

I don't know tweetsharp at all, but based on the following link you could try the following:

var followers = service.ListFollowersOf(user_id);
while (followers.NextCursor != null)
{
    followers =  service.ListFollowersOf(user_id, followers.NextCursor);
}

这篇关于如何获取完整的关注者列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆