You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is it possible to get the number of followers that an account has? #167
Yes, though it's kinda hard to find because the Reddit API hides it in a weird place. You're familiar with user subreddits, right? What you need to do is actually retrieve the data for that user's subreddit. The "Subscribers" property in this case is actually the user's follower count.
For example, here's a quick and dirty way to retrieve my follower count in C#:
Console.WriteLine($"KrisCraig has {reddit.Models.Subreddits.About("u_KrisCraig").Subscribers} followers.");
Now that I think of it, this is downright counter-intuitive. I think maybe I should go ahead and add a "Followers" property that performs the necessary API call and retrieves/caches the subscribers count.
Activity
sirkris commentedon May 28, 2023
Yes, though it's kinda hard to find because the Reddit API hides it in a weird place. You're familiar with user subreddits, right? What you need to do is actually retrieve the data for that user's subreddit. The "Subscribers" property in this case is actually the user's follower count.
For example, here's a quick and dirty way to retrieve my follower count in C#:
Console.WriteLine($"KrisCraig has {reddit.Models.Subreddits.About("u_KrisCraig").Subscribers} followers.");Now that I think of it, this is downright counter-intuitive. I think maybe I should go ahead and add a "Followers" property that performs the necessary API call and retrieves/caches the subscribers count.