Was there any changes in XML-RPC?!
-
I have some troubles with XML-RPC (
<?php
include(“./wp-includes/class-IXR.php”);
$client = new IXR_Client(‘http://lazy2wayfarer.wordpress.com/xmlrpc.php’);
$content[‘title’] = ‘Test Draft Entry using MetaWeblog API’;
$content[‘categories’] = array($response[1][‘categoryName’]);
$content[‘description’] = ‘<p>Hello World!</p>’;
if (!$client->query(‘metaWeblog.newPost’,”, ‘admin’,’MYPASSWORD’, $content, false)) {
die(‘An error occurred – ‘.$client->getErrorCode().”:”.$client->getErrorMessage());
}
echo $client->getResponse(); //with WordPress, will report the ID of the new post
?>I have the error
An error occurred – -32700:parse error. not well formed
What’s wrong?
The blog I need help with is: (visible only to logged in users)
-
-
-
You need to do some searching in the codex over at http://wordpress.org/ and search for xml-rpc. There is a good bit of information on the API over there, and it is the same used here.
-
-
You are going to have to either talk to support over at worpdress.ORG, or wait till staff is back in the office on the 19th and then contact them directly at http://en.support.wordpress.com/contact/
-
I tried your code against a WordPress.com blog (with modified account info) and it posted a draft post just fine.
I suggest looking at the raw HTTP response to see what it looked like. Hopefully you’ll be able to quickly spot what caused the parser to fail.
Also you can use HTTPS for XML-RPC requests on WordPress.com.
- The topic ‘Was there any changes in XML-RPC?!’ is closed to new replies.