One weird thing… I can’t get a list of all post ids via XML-RPC? I would have thought that would be a common command.
It doesn’t look like there’s much functionality in XML-RPC when it comes to comments. There is the mt_allow_comments field on posts that I should be able to turn on/off via XML-RPC, but there is no way to find out information about the number of comments on posts.
I think what I’ll do is use the WXR export file as an input, parse it for comment information, and then use XML-RPC to twittle the comments allowed bit automatically.
—
This is what I get running mt.supportedMethods
$VAR1 = [
'wp.getUsersBlogs',
'wp.getPage',
'wp.getPages',
'wp.newPage',
'wp.deletePage',
'wp.editPage',
'wp.getPageList',
'wp.getAuthors',
'wp.getCategories',
'wp.newCategory',
'wp.suggestCategories',
'wp.uploadFile',
'blogger.getUsersBlogs',
'blogger.getUserInfo',
'blogger.getPost',
'blogger.getRecentPosts',
'blogger.getTemplate',
'blogger.setTemplate',
'blogger.newPost',
'blogger.editPost',
'blogger.deletePost',
'metaWeblog.newPost',
'metaWeblog.editPost',
'metaWeblog.getPost',
'metaWeblog.getRecentPosts',
'metaWeblog.getCategories',
'metaWeblog.newMediaObject',
'metaWeblog.deletePost',
'metaWeblog.getTemplate',
'metaWeblog.setTemplate',
'metaWeblog.getUsersBlogs',
'mt.getCategoryList',
'mt.getRecentPostTitles',
'mt.getPostCategories',
'mt.setPostCategories',
'mt.supportedMethods',
'mt.supportedTextFilters',
'mt.getTrackbackPings',
'mt.publishPost',
'pingback.ping',
'pingback.extensions.getPingbacks',
'demo.sayHello',
'demo.addTwoNumbers',
'wpStats.get_blog_id',
'wpStats.update_bloginfo',
'wpStats.update_postinfo',
'wpStats.ping_blog',
'wpStats.flush_posts'
];
and here are some samples of the info I can retrieve about a post
{
'permaLink' => 'https://wptheme.wordpress.com/2006/09/11/this-is-a-te st-blog-2/',
'wp_password' => '',
'userid' => '190902',
'mt_allow_pings' => '0',
'mt_excerpt' => 'POST EXCERPT DISPLAYS INSTEAD OF POST',
'wp_author_display_name' => 'engtech',
'dateCreated' => '20060911T00:52:20',
'link' => 'https://wptheme.wordpress.com/2006/09/11/this-is-a-test-bl og-2/',
'wp_slug' => 'this-is-a-test-blog-2',
'mt_allow_comments' => '0',
'categories' => [
'This is a really really really long category name',
'Child C',
'Category w/ Description'
],
'description' => 'Hi there, welcome to <a href="https://engtech.wordp ress.com">//engtech</a>\'s little corner of the Internet for testing out themes on WordPress.com before switching them to my blog.
<a href="https://wptheme.wordpress.com/2006/09/11/html-tag-test/">Jump directly t o the HTML test.</a>
Comments are off for this posts, but it does have comments and should display th em.
This post has an excerpt.',
'postid' => '4',
'wp_author_id' => '190902',
'title' => 'Comments off, excerpt test.',
'mt_text_more' => ''
},
{
'permaLink' => 'https://wptheme.wordpress.com/2005/09/11/old-post-3/' ,
'wp_password' => '',
'userid' => '190902',
'mt_allow_pings' => '0',
'mt_excerpt' => '',
'wp_author_display_name' => 'engtech',
'dateCreated' => '20050911T03:46:43',
'link' => 'https://wptheme.wordpress.com/2005/09/11/old-post-3/',
'wp_slug' => 'old-post-3',
'mt_allow_comments' => '0',
'categories' => [
'Uncategorized'
],
'description' => 'Creating post archive',
'postid' => '10',
'wp_author_id' => '190902',
'title' => 'Old Post #3',
'mt_text_more' => ''
},