Forums

Problems with wp.deleteComment (8 posts)

  1. dl3onard
    Member
    Posted 6 months ago #

    Hi all!
    I'm new here. I'm developing an application for blogging. I'm using XML-RPC and before today I had not problems.

    Now I'm developing the code for removing comments using wp.deleteComment. I use this RPC correctly, in fact the XML request code is:

    <methodCall>
    	<methodName>wp.deleteComment</methodName>
    	<params>
    		<param>
    			<value>
    				<string>[Blog-id]</string>
    			</value>
    		</param>
    		<param>
    			<value>
    				<string>[username]</string>
    			</value>
    		</param>
    		<param>
    			<value>
    				<string>[passwd]</string>
    			</value>
    		</param>
    		<param>
    			<value>
    				<string>[comment-id]</string>
    			</value>
    		</param>
    	</params>
    </methodCall>

    the return value for this RPC should be a Boolean.
    But server always returns something similar to blog index's whole source code.

    Where is the problem?
    thanks in advance and sorry for my english

  2. dl3onard
    Member
    Posted 6 months ago #

    the blog i'm trying to edit is on *.wordpress.com

    Isn't hosted on my own server

  3. josephscott
    Member
    Posted 6 months ago #

    This is what I get back when a call to wp.deleteComment successfully deletes a comment:

    <?xml version="1.0"?>
    <methodResponse>
      <params>
        <param>
          <value>
            <boolean>1</boolean>
          </value>
        </param>
      </params>
    </methodResponse>

    Which is corret. Can you give more details on the results you are seeing?

  4. dl3onard
    Member
    Posted 6 months ago #

    hi!
    I can't paste the whole code, because is too long.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
    
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    ...
    ...

    It's home's whole source code!

    I can't understand...I think the way I use this RPC is correct. I think the parameters I posted in my first post are ok...It's a server problem?

  5. dl3onard
    Member
    Posted 6 months ago #

    up :(

  6. josephscott
    Member
    Posted 6 months ago #

    Probably a server problem. Look at the HTTP status that is being returned and the content of the HTML for clues. I suspect that either your host is blocking XML-RPC requests, or your setup is off and returning a 404 page.

  7. dl3onard
    Member
    Posted 6 months ago #

    It's ok...I'm an idiot.
    I'm executing the request to *.wordpress.com rather than to *.wordpress.com/xmlrpc.php

    Sorry for wasting your time.

    Thanks.

  8. josephscott
    Member
    Posted 6 months ago #

    That's what RSD is for (check out the RSD <link> in the HTML source of your blog), it provides the XML-RPC end point for your WordPress blog.

Reply

You must log in to post.

About this Topic