sirkris / Reddit.NET

A Reddit API library for .NET Standard with OAuth support. Written in C#.
MIT License
508 stars 78 forks source link

Selfpost not working [Question/Discussion] #181

Open seanrco opened 1 year ago

seanrco commented 1 year ago

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