如何获得追随者的完整列表 [英] How to get the complete list of followers

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

问题描述

使用 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);

这方法是长光标第二个参数,但我不知道如何使用它。
我试图使用它作为偏移,但它不工作。
我presume每个请求后,我需要一个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可言,但基于<一个href=\"https://github.com/danielcrenna/tweetsharp/blob/master/src/net40/TweetSharp.Next.Tests/Service/TwitterServiceTests.cs\"相对=nofollow>以下链接你可以尝试以下方法:

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天全站免登陆