Post to WordPress With iKnode
We are avid users of Wordpress. I have been using Wordpress as the Blog engine in my personal blog for years now. I really like the platform. Recently we have been helping several of our users integrate iKnode with Wordpress, specially for inserting Blog posts automatically. So we have built an wrapper to make it easy for iKnode apps to automatically insert posts into an existing wordpress blog.
Setting up Wordpress.
Wordpress uses the XML RPC protocol for integration. In order for iKnode to be able to interact with a Wordpress blog, XMLRPC needs to be enabled in the site. You can do this by going to Settings > Writings, in the Remote Publishing Section check the XML-RPC check box.
Now we ready to create the iKnode App.
Creating the iKnode Application
The wrapper we created is in iKnode.Applications, so we don’t need to add any other assemblies. We just need to use the iKnode.Applications.Web namespace.
The signature of the method to add a new post is displayed below:
1 2 3 4 5 6 7 8 9 10
It is as simple as initializing the WordPressClient and then just passing the parameters to the NewPost method.
Here is the complete sample
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Just run this sample. Once it finishes it will return the blog post id and you should be able to see it in your Wordpress site.