Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.