我在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