0

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

2
  • 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
    Commented Jul 31, 2012 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
    Commented Jul 31, 2012 at 3:30

1 Answer 1

0

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.

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