Skip to content

Unable to get authornames of child comments replying to my comments, or authornames of the comments/posts I've replied to #230

@steviecs

Description

@steviecs

The code I have attempted with isn't quite getting me there - just wanting to know if I'm making a mistake, or if this isn't currently supported. I also keep getting the following exception System.InvalidOperationException: Enumerator is in an invalid state;

        var myComments = reddit.User.GetComments(7).Where(i => i.More.Children.Any() || i.Parent != null);

        myComments.ForEach(comment =>
        {
            foreach (var property in comment.More.Children)
            {
                Console.WriteLine(property);
            }
        });


        myComments.ForEach(comments =>
        {
            foreach (var comment in comments.Comments)
            {
                Console.WriteLine(comment.AuthorName);
            }
        });

I can't grab any properties relating to children author names off of property or comment. I've tried a couple different ways, but I was able to do this with people who replied to my posts - just not those who have replied to my comments.

Any insight is welcome, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions