通过C#/ vb.net应用程序后/上传的多媒体添加到单词preSS网站? [英] add a post / upload media to wordpress site through a C# / vb.net application?

查看:128
本文介绍了通过C#/ vb.net应用程序后/上传的多媒体添加到单词preSS网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都知道,如果它能够通过一个.NET应用程序中添加图像后,并上传到一个字preSS博客(个体经营托管)?

Anyone know if its possible to add a post and upload images to a wordpress blog (self hosted) via a .net application?

我看我可以使用XML-RPC.net用字preSS XML-RPC接口来说话,但我看到几个真正的文件和各地的样品。

I see i could use XML-RPC.net to talk with the wordpress XML-RPC interface, but i see really few documentation and samples around.

推荐答案

您可以使用 JoeBlogs 库访问的API 。利用这一点,与博客的工作很简单:

You can use JoeBlogs library to access the API. Using that, working with the blog is very simple:

var blog = new WordPressWrapper("https://svicktest.wordpress.com/xmlrpc.php", "svicktest", "mypassword");

byte[] imageData = …;

var image = blog.NewMediaObject(new MediaObject { bits = imageData, name = "Plane.jpg", type = "image/jpeg"});

blog.NewPost(new Post { title = "Hello!", description = "Hello world! <img src=\"" + image.url + "\" />" }, true);

这篇关于通过C#/ vb.net应用程序后/上传的多媒体添加到单词preSS网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆