使用 twitterizer 获取所有 Twitter 关注者

发布于 2024-09-14 17:43:52 字数 235 浏览 2 评论 0原文

我正在使用 Twitterizer 2。总的来说,它的工作效果非常好,但我缺少一件事。
我需要获得我的用户的所有关注者。并且该方法带来的 Twitterizer.TwitterFriendship.Followers(Token) 只带来了其中的 100 个。
在 twitter API 中,我看到您可以使用光标来“分页”您请求的内容,但我在 twitterizer 中找不到此功能。
有人有什么想法吗?

I am using Twitterizer 2. in general it does the job very well, but I have one thing missing.
I need to get all the followers of my user. and the method brings Twitterizer.TwitterFriendship.Followers(Token) only brings 100 of them.
in the twitter API I saw that you can use a cursor for "paging" you request, but I couldn't find this functionality in twitterizer.
Any Idea anyone?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

离笑几人歌 2024-09-21 17:43:52

TwitterUserCollection 类(由 Followers 方法返回)具有 NextPage() 和 PreviousPage() 方法,可以为您执行分页。

例如,要获取所有关注者,您可以执行以下操作:

TwitterUserCollection myFollowers = TwitterFriendship.Followers(token);

while (myFollowers != null)
{
    // Do something with the users here

    // Get the next page
    myFollowers = myFollowers.NextPage();
}

如果您有其他问题,请将其发布在我们的论坛中:http://forums.twitterizer.net/

The TwitterUserCollection class (that is returned by the Followers method) have NextPage() and PreviousPage() methods that will perform the paging for you.

For example, to get all of your followers, you can perform this:

TwitterUserCollection myFollowers = TwitterFriendship.Followers(token);

while (myFollowers != null)
{
    // Do something with the users here

    // Get the next page
    myFollowers = myFollowers.NextPage();
}

If you have additional questions, please post them in our forums: http://forums.twitterizer.net/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文