Is it possible to use Wordpress API to make posts

2019-08-27 20:26发布

I'm aware that the wordpress API can be used to make posts to wordpress blogs hosted on your own server/website. However, is it possible to also make posts to blogs hosted on wordpress.com using the api? If so, where can I find the details such as the URLs to which to make the api requests, etc?

Currently I'm only interested in adding new posts to blogs hosted on wordpress.com and verifying the login info (so any function which will verify the login info without changing anything, e.g a method which returns the number of posts in the blog, would be fine).

I will be using PHP and preferably use XML-RPC to make the API requests.

2条回答
Deceive 欺骗
2楼-- · 2019-08-27 21:01

hi look for http://codex.wordpress.org/XML-RPC_wp ,where u can find u all want

have dream day

查看更多
你好瞎i
3楼-- · 2019-08-27 21:10

Yes, you can use the API. The url you'll need is http://<blogname>.wordpress.com/xmlrpc.php

I have made use of the Windows Live Writer application to post to my own wordpress.com blog, and in the setup phase, this is the data it asked me to provide.

As for suggesting a read-only call to test login, I'm afraid my knowledge of the API is very rusty, so I can only suggest looking at the API docs.

HTH

查看更多
登录 后发表回答