metaWeblog.getRecentPosts is returning nothing in my iphone app

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

Topic xml-rpc iphone Wordpress

Category Web


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.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.