我在Wordpress上使用来自Redstone的XMLRPC Api进行发布。尽管这篇文章已经发布,但永久链接没有正确设置。我的代码:WordPress的XMLRPC(红石)永久链接不工作
XmlRpcClient client = new XmlRpcClient("xmlrpc link...", true);
HashMap hmContent = new HashMap();
hmContent.put("title", "my post title");
hmContent.put("description", "my new post");
hmContent.put("permaLink", "my-brand-new-post"); <- this should be the permalink
token = client.invoke("metaWeblog.newPost", new Object[] {new Integer(1),
"username",
"password",
hmContent,
true});
我设置的固定链接被忽略,Wordpress基于帖子标题创建了固定链接。 这可能是什么原因造成的?
编辑:添加“wp_slug”值是有用的。虽然"slug"并不意味着为了这个,我觉得:
hmContent.put("wp_slug", "my-brand-new-post");
你能帮我吗我调用wordpress后调用对象响应时遇到问题。在获得对象名称标记之后,您是如何使用这些信息的?我得到这样的东西 {item_one = info,item_two = info ...} – inspired 2013-09-19 00:03:13