I’m using WordPressSharp and trying to add content into my wordpress blog.
I’m having trouble with adding content.
Helper.WordpressConfigurations.postToWordpress(1, "testing", "content description");
Here is my post method
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
};
}
Having exception in WordPressClient.cs >
my full code here http://paste.ubuntu.com/10793675/
WordPressSharp depends on xml-rpc.net version 3.0.0, which is not yet a stable version and seems to have bugs. Try using version 2.5.0 instead.
It worked in my case, and I hope it’ll be of help to you.