Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selfpost not working [Question/Discussion] #181

Open
seanrco opened this issue Aug 26, 2023 · 0 comments
Open

Selfpost not working [Question/Discussion] #181

seanrco opened this issue Aug 26, 2023 · 0 comments

Comments

@seanrco
Copy link

seanrco commented Aug 26, 2023

Hi All,

New to Reddit.NET and using it to make a fairly simple sports game thread bot. So far able to get most of my bot in place using Reddit.NET (great work by the community that made this!). However, I am running into issue trying to submit new post(s) to a subreddit. See my example code below:

.
.
.
// Get Subreddit (using fake sub name for sake of anonymity)
var sub = redditClient.Subreddit("Foo");

//Create new post (assume FooAuthor is real and mod of sub)
var newPost = sub
     .SelfPost("Test Post", "This is just a test!", "<p><b>Some HTML!<//b><//p>", "FooAuthor")
      .Submit();

//  New Poist ID is captured (but new post never shows in sub)
Console.WriteLine("New Post ID: " + newPos.Id);
.
.
.

Anything I can troubleshoot? Or am I just making the incorrect calls?

Lastly, what is the preferred method of asking questions related to Reddit.NET (here, StackOverflow, etc.)?

Regards,

seanrco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant