Reddit.NET icon indicating copy to clipboard operation
Reddit.NET copied to clipboard

Is it possible to get the number of followers that an account has?

Open nmills3 opened this issue 3 years ago • 1 comments

I'm trying to get the follower count of the user that the bot is running as, but i can't seem to find a way to do it

nmills3 avatar Oct 13 '22 14:10 nmills3

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.

sirkris avatar May 28 '23 03:05 sirkris