WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

metaWeblog.getRecentPosts is returning nothing in my iphone app, follwong is my objective c code to call that method,xml-rpc wordpress methods like wp.getUsers are working fine, but the methods which are used retrive commets,posts(wp.getComments ,metaWeblog.getRecentPosts ) are returning null

NSArray *arrParameters = [NSArray arrayWithObjects:@"1", @"username", @"password", nil];
    NSString *strServer = [[[NSString alloc] initWithString:@"http://abc.com/xmlrpc.php"] autorelease];         // the server
    NSString *strMethod = [[[NSString alloc] initWithString:@"metaWeblog.getRecentPosts"] autorelease];                        // the method
    XMLRPCRequest *objXMLRPCRequest = [[XMLRPCRequest alloc] initWithHost:[NSURL URLWithString:strServer]];
    [objXMLRPCRequest setMethod:strMethod withObjects:arrParameters];

how can i resolve this,,,? is there any method to list the comments

share|improve this question
Please edit your question and format it as good as possible: uppercase/lowercase letters, code tags, etc. Later readers should have a good and easy read too. At least we're not in some chat :) – kaiser Jul 31 '12 at 3:28
IMPORTANT Please always add any needed information - For example that you're using a class from a GitHub library. One user already had invested enough time to find that out - DON'T force others to repeat that task! – kaiser Jul 31 '12 at 3:30

The XML-RPC has a filter, where you can add your custom methods:

function wpse60127_xmlrpc_methods( $methods )
    $methods['newWPSE60127Method'] = 'wpse60127_new_method';
    return $methods;
add_filter( 'xmlrpc_methods', 'wpse60127_xmlrpc_methods' );

Simply add your own methods there (core methods/functions) are also allowed.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.