Skip to:
Content
Pages
Categories
Search
Top
Bottom

Support BP album with XML-RPC commands

Viewing 7 replies - 1 through 7 (of 7 total)
  • another plugin could hook into it and add more commands via the “bp_xmlrpc_methods” filter… as it mimics the wp xmlrpc file.

    the class instance is called $bp_xmlrpc_server (which has a login method already built in)

    Avatar of Gpo1
    gpo1
    Participant

    @gpo1

    How do I add more commands to the xml_rpc for clients

    Avatar of Gpo1
    gpo1
    Participant

    @gpo1

    Also have you tried it on these clients ?
    http://iphone.wordpress.org/

    http://android.wordpress.org/

    No, those clients are built for wordpress… this buddypress xml-rpc is independent of WP and would need a client built for it.

    This tutorial below is WP focused as you would need to change the filter and global names but the same theory: (and i don’t use the password but an apikey generated on the user’s profile page)
    http://kovshenin.com/archives/custom-xml-rpc-methods-in-wordpress/

    function my_bp_xmlrpc_methods( $methods ) {
    $methods = ‘my_function';
    return $methods;
    }
    add_filter(‘bp_xmlrpc_methods’, ‘my_bp_xmlrpc_methods’);

    function my_function($args) {
    global $bp, $bp_xmlrpc_server;

    // Parse the arguments, assuming they’re in the correct order
    $username = $args[0];
    $apikey = $args[1];
    $data = $args[2];

    // Let’s run a check to see if credentials are okay
    if ( !$user = $bp_xmlrpc_server->login($username, $apikey) )
    return $bp_xmlrpc_server->error;

    //now do whatever you want with the $data array as it contains the what the client passed in
    //the global $bp instance works here in limited form after calling $bp_xmlrpc_server->login

    }

    Avatar of Gpo1
    gpo1
    Participant

    @gpo1

    Can you amend it so that wordpress app (android & iphone) works out of the box.
    These makes it easy for users to use.

    well those two clients are built just for wordpress – nothing i would have control over. you would have to ask the creator of those to build in some functionality. (which i’m assuming is automattic)

    Avatar of Gpo1
    gpo1
    Participant

    @gpo1

    So what script or code do I need the wordpress app for ask to do?
    FYI

    http://android.forums.wordpress.org/

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.