Viewing 3 replies - 1 through 3 (of 3 total)
  • I wish to know the answer to this question as well. As I know ScribeFire is able to post to my blog with tags I would like to know how.

    Can it be done? If so, how?

    You can add/edit tags on a post via the mt_keywords field in the metaWeblog.newPost and metaWeblog.editPost XML-RPC methods.

    function metaWeblog_newPost( $blogid, $title, $content, $tags, $category="") {
      global $g_id;
      global $g_passwd;
      global $g_blog_url;
    
      $client = new xmlrpc_client( "{$g_blog_url}");
      $f = new xmlrpcmsg("metaWeblog.newPost", // metaWeblog.newPost method
        array(
          new xmlrpcval("{$blogid}", "string"), // blogid.
          new xmlrpcval($g_id, "string"), // user ID.
          new xmlrpcval($g_passwd, "string"), // password
          new xmlrpcval( // body
              array(
                'title'        => new xmlrpcval($title, "base64"),
                'description'    => new xmlrpcval($content, "base64"),
                'category'    => new xmlrpcval($category, "base64"),
                'mt_keywords' => new xmlrpcval($tags, "base64")
            ), "struct"),
          new xmlrpcval(true, "boolean") // publish
        )
      );
    
      $f->request_charset_encoding = 'UTF-8';
    
      $response = $client->send($f);
      return $response;
    }

    I found this source code here. Works like a charm!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘XML-RPC function/hook for native tags’ is closed to new replies.