开发者

Future posting with dateCreated in Wordpress via XMLRPC in Ruby

开发者 https://www.devze.com 2022-12-19 08:22 出处:网络
I\'m reaching the end of my tether trying to schedule a new post through Wordpress\' XMLRPC interface from Ruby.

I'm reaching the end of my tether trying to schedule a new post through Wordpress' XMLRPC interface from Ruby.

I am creating a new Time object and filling it with my date and time, I then call .xmlschema to get a datetime string in the correct format for Wordpress' XMLRPC interface.

Unfortunately, Wordpress treats this as a string, and I can't work out how to get the xmlrpc.php to treat it as an object; really can't get my head around it.

Calling the metaWeblog.newPost method, and sending:

{:title => 'Foo', :post_status => 'publish', :dateCreated => my_date.xmlsc开发者_开发问答hema} 

to Wordpress.

Anyone been through this before?


Can you check what you are actually sending (the post data)? The date should be encapsulated in <dateTime.iso8601></dateTime.iso8601>, not in <string></string>. The WordPress Trac has a similar report.

0

精彩评论

暂无评论...
验证码 换一张
取 消