I'm using WordPressSharp and trying to add content into my wordpress blog.
I'm having trouble with adding content.
Here is my post method
Having exception in WordpressClient.cs >
<img src=" " alt="enter image description here" />
my full code here <a href="http://paste.ubuntu.com/10793675/" rel="nofollow noreferrer">http://paste.ubuntu.com/10793675/</a>
I'm having trouble with adding content.
Code:
Helper.WordpressConfigurations.postToWordpress(1, "testing", "content description");
Code:
public static Post setPost(int postType, string title, string content)
{
string type = postType == 1 ? "post" : "page";
int categoryId = 0;
switch ("".ToLowerInvariant())
{
case "arrow": categoryId = 4; break;
default: categoryId = 0; break;
}
return new Post
{
PostType = "post", // "post" or "page"
Title = title,
Content = content,
PublishDateTime = DateTime.Now,
Status = "publish"//, // "draft" or "publish",
//Terms = terms
};
}
<img src=" " alt="enter image description here" />
my full code here <a href="http://paste.ubuntu.com/10793675/" rel="nofollow noreferrer">http://paste.ubuntu.com/10793675/</a>