I use XML-RPC.net 3 and joeblog dll in C#. Everything is OK, but I cant create and send post-tags to WordPress.
I can create posts with categories, title, excerpt, content, cutomfields but no success to create post-tags.
Its my code:
public void createPost(newPost np)
{
loginformobject = new LoginForm();
string postid;
icp = (IcreatePost)XmlRpcProxyGen.Create(typeof(IcreatePost));
clientProtocol = (XmlRpcClientProtocol)icp;
clientProtocol.Url = url.Text;
try
{
postid = icp.NewPost(1, User.Text, Pass.Text, np, 1);
}
catch (Exception ex)
{
MessageBox.Show("createPost ERROR ->" + ex.Message);
}
}
private void button1_Click(object sender, EventArgs e)
{
customField newCustomField2 = default(customField);
newCustomField2.key = "Testttttttttttt";
newCustomField2.value = "testttvalye";
newPost newBlogPost = default(newPost);
newBlogPost.title = "Some Title<AliReza Test>";
newBlogPost.description = "Some description Test Test Test Test<AliReza Test>";
newBlogPost.custom_fields = new customField[] { newCustomField2 };
newBlogPost.categories = new string[] { "Test" };
newBlogPost.mt_excerpt = "Tozihate Kotah";
newBlogPost.mt_taxonomy = new string[] { "test","test2" };
createPost(newBlogPost);
}
How can send post with tags within XML-RPC in C#?
Is there any library or code to create post-tags?
Thanks for any help.
fix to this
and