• davemee

    (@davemee)


    Hi All!

    I’m posting to a wordpress blog using Matt Shaw’s excellent Actionscript classes (https://xmlrpcflash.mattism.com/)

    This is the payload that wordpress is getting from my flash movie: it creates a new post, but seems to miss out the enclosure

    —————

    <methodCall>
    <methodName>metaWeblog.newPost</methodName>
    <params>
    <param>
    <value><string>Scan</string></value>
    </param>
    <param>
    <value><string>SCAN</string></value>
    </param>
    <param>
    <value><string>scan</string></value>
    </param>
    <param>
    <value>
    <struct>
    <member>
    <name>title</name>
    <value><string>default title</string></value>
    </member>
    <member>
    <name>description</name>
    <value><string><p>default content</p></string></value>
    </member>
    <member>
    <name>enclosure</name>
    <value>
    <struct>
    <member>
    <name>url</name>
    <value><string>https://suse/scan/sessions/SESSION10-001.mp3</string></value>
    </member>
    <member>
    <name>type</name>
    <value><string>audio/mpeg</string></value>
    </member>
    <member>
    <name>length</name>
    <value><string>537582</string></value>
    </member>
    </struct>
    </value>
    </member>
    </struct>
    </value>
    </param>
    <param>
    <value><boolean>true</boolean></value>
    </param>
    </params>
    </methodCall>

    ———
    Can anyone see if there’s anything obviously wrong, or is there an issue with the metaWblog API XML RPC implementation in wordpress 2?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter davemee

    (@davemee)

    Solved!

    WordPress seems to ignore the <enclosure> tag with XML RPC. The only way to generate enclosure tags in the RSS feed is by explicitly placing a link in the post body.

    This isn’t a great solution, as I am planning to place several local files in the post, yet only one should appear as the enclosure, and there seems to be no way to control which file will appear.

    Thanks for reading this thread, and good luck with your XML RPC posting!

    hoyd

    (@hoyd)

    Dave,

    If you put a link to a file in your post body, and then post using xmlrpc, do you get enclosure generation in WP 2.0.1? I’m using Ecto to post, and the enclosures are not generated for the links to mp3 files that I’m putting in the post?

    I just checked out that link in your post again and noticed that it’s posting to a WP.com site – I CAN get enclosures to generate at the WP.com sites – it’s the standalone 1.5.2 or 2.0.1 where xmlrpc.php doesn’t seem to want to generate the enclosures.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘metaweblog api: newpost and enclosure problem?’ is closed to new replies.