How to make a post to wordpress using the api?

Click Upvote picture Click Upvote · Jan 24, 2010 · Viewed 12.5k times · Source

How can I remotely make a post to a user's blog after he/she gives me his login info using the wordpress api? What method do i need to use, what paremeters should it have, etc? Sample code will be great.

I'd prefer to use the XML-RPC api but others will also be acceptable.

Answer

jspcal picture jspcal · Jan 24, 2010

yeah you can use metaWeblog.newPost or blogger.newPost, an example of the first:

http://www.wprecipes.com/post-on-your-wordpress-blog-using-php

uses curl and xmlrpc_encode_request

an example of the second:

http://www.nickycakes.com/post-to-wordpress-remotely-with-xmlrpc-in-php/

yeah and @Francis is correct