XML-RPC metaWeblog.newPost not returning the postid

  • Author
  • #1135237


    I’ve built myself a tool for posting to my WordPress.com site via XML-RPC. When I use the tool with the metaWeblog.newPost a new post is in fact created. However, according to the documentation (http://codex.wordpress.org/XML-RPC_MetaWeblog_API#metaWeblog.newPost) the postid, an integer, should be as a string in the response. It is not though.

    I am using PHP and cURL with the metaWeblog.newPost XML-RPC method. As I’ve stated it is capable of creating a blog post but does not return the postid. Instead it returns FALSE.

    When I mess up the login creds I get a faultCode 403 and can see the message in my cURL response. And when I don’t the post shows up. So this leads me to believe it isn’t my code but rather WordPress.com not returning the postid on purpose.

    What I really want is the permalink of the new post. I had intended to use the postid with the metaWeblog.getPost method in order to get that permalink. Is there another way to get the permalink?



    Unless or until your post an active link starting with http:// to the exact blog in question there will be no accurate answer to your question that we Volunteers can provide. Please provide the URL now.



    Your reference to the codex which is only for Wordepress>ORG installs leads me to believe the site in question is not a site being hosted by WordPress.com. We provide support only for free hosted WordPress.com blogs here. Support for WordPress.ORG installs is provided on the WordPress.ORG support forums and they are here http://wordpress.org/support/ If you don’t have a username account at WordPress.org, click that link and register one on the top right hand corner of the page that opens, so you can post to the correct support forums for your software.

The topic ‘XML-RPC metaWeblog.newPost not returning the postid’ is closed to new replies.