xmlrpc & tag

  • Author
    Posts
  • #235416

    Hi, I am posting to my blog using xmlrpc. I can associate categories to the blog, also there is a method to get the current categories from wordpress. I was wondering if there is a way to associate the tag to the blog, using xmlrpc, I also didn’t find a method to get your existing tag.

    #235553

    jamesewelch
    Member

    Do you mean get the current categories from wordpress.com or from your wordpress blog?

    There is an XML RPC method to do that, but I guess it depends on which XMLRPC library you are using. Same issue with the tags. In the library that I used, it had a method to associate tags and categories, etc.

    Which XML RPC library and which langauge are you using?

    #235558

    The metaWeblog.getPost/editPost/newPost methods have support for the mt_keywords field, which contains the tags for a post. There is no method to simply get all of the tags used in your blog, like you can do for categories. That would be an interesting feature to have though.

    #235575

    Thanks josephscott, I was using blogger.newPost and it didn’t have anything like that, also I didn’t find the mt_keywords field in xmlrpc.php that I got from wordpress.org , I believe it is 2.4 version and wordpress.com uses the same xmlrpc.php

    I will make a support request for having a method for getting all the tags.

    Jamesewelch,

    I am using php, and an XML RPC library available here – http://www.guardiansoftware.net/wordpressxmlrpc

    #235577

    jamesewelch
    Member

    What I did was to just grab all of my posts loop through them, create key value pair data structure to grab/store all of my tags (with the tag count as the value), so I could do stats, etc. It’s not the most eloquent of techniques, but it works. You could do something like that and just save that locally or in a cache, so you would only call it when you needed to refresh it.

    #235580

    Thanks jameswelch, that answer one part of my question, the other question is when I post a message to my blog how do I associate tags to it.

    #235595

    As I mentioned before, using metaWeblog.newPost, you can set tags via the mt_keywords field.

    #235837

    thanks josephscott, what language do you use to post to the wordpress, do you mind sharing your code for a post with metaWeblog.newPost

    #235838

    I do mostly PHP, for XML-RPC I use the IXR library http://code.google.com/p/ixr/

    Docs are at http://scripts.incutio.com/xmlrpc/

    #235839

    Thanks josephscott. I will take a look at it.

The topic ‘xmlrpc & tag’ is closed to new replies.