it works with wordpress installations which uses these configurations
https://backlink.blogofisi.com/i.php
but not working with this
https://e-winsa.com/blog/i.php
when i compared responses only difference i could see was on header “Vary: Accept-Encoding,User-Agent” can it be because of it?
]]>Invalid server response – The response to the blogger.getUserBlogs method received from the blog server was invalid. Invalid response document returned from XmlRpc server.
I’ve tried also to remove the blog from Windows Live Writer and configure it again, but I get the same error. The same situation happens with all the other blogging applications (both desktop and mobile) I’ve tried.
The problem came out from nowhere: it didn’t start after any particular operation and I’ve changed nothing in blog configuration.
Do you have any idea what’s going on?
Thanks!
]]>I dont understand the problem, am i missing anything or it is by design that XMLRPC will return only 20 recent post.
]]>What i need:
I have set some custom fields, activated the post thumbnails and so on, to create the post with postthumbnails manually – all works fine.
Now i want to import over 1000 datasets with images automatically.
What i have tried:
Through xmlrpc (metaweblog API) i can add a post and i can add a media object, but i’m not able to connect both elements. I dont know, how i can set the posthumbnail via xmlrpc. The newMediaObjects only returns url, file and type, but no attachment ID.
I hope someone knows an alternative working way, to add posts with thumbnails automatically.
Thanks alot, Daniel
]]>I’m uploading images via XML-RPC using metaWeblog.newMediaObject
My code seems to work fine, because after the upload I become as answer something like:
array(3)
{
["file"]=> string(8) "Aara.jpg"
["url"]=> string(66) "https://myblog.com/wp-content/uploads/2010/09/Aara.jpg"
["type"]=> string(10) "image/jpeg"
}
But if I check the uploaded image, it is just a few bytes big and has a size of 0 x 0 pixel. Does anyone knows whats wrong?
This is my code (PHP):
$XmlRpc_result = null;
$XmlRpc_client = new IXR_Client ($data['Blog']['url'].'/xmlrpc.php');
$image = array
(
'name' => 'Aara.jpg',
'type' => 'image/jpeg',
'bits' => new IXR_Base64 (dirname ( __FILE__).'/image.jpg')
);
try
{
$XmlRpc_result = $XmlRpc_client->query
(
'metaWeblog.newMediaObject',
1,
$data['Blog']['wp_user'],
$data['Blog']['wp_pw'],
$image
);
var_dump ($XmlRpc_result);
}
catch (Exception $e)
{
var_dump ( $e->getMessage ());
}
I also tried using the Zend_XmlRpc_Client Class form the Zend Framework, with the same result.
The image I’m uploading is around 80 Kb big and has a size of 600×400 px.
Thanks a lot in advance for any answer.
]]>Anyways, I have this definition of the metaWeblog.getTemplate
call which has a parameter I do not understand and no where can I find an explanation. What is the templateType parameter supposed to be? Every time I use the call it returns without error but with an empty value.
metaWeblog.getTemplate (appkey, blogid, username, password, templateType) returns string
Thank you!
]]>I created a tool to manage a huge amount of blogs. This tool should also be able to scedule Postings. I saw that the metaWeblog.newPost command has the fields ‘dateCreated’ and ‘date_created_gmt’. If i assign a Date to it, i get no response from the xmlrpc.php. I figured out that it might be an error at the following code:
starting at line 2183:
// Do some timestamp voodoo
if ( !empty( $content_struct['date_created_gmt'] ) )
$dateCreated = str_replace( 'Z', '', $content_struct['date_created_gmt']->getIso() ) . 'Z'; // We know this is supposed to be GMT, so we're going to slap that Z on there by force
elseif ( !empty( $content_struct['dateCreated']) )
$dateCreated = $content_struct['dateCreated']->getIso();
$content_struct[‘dateCreated’] and $content_struct[‘date_created_gmt’] are NOT objects, they are just an sting, so the call of ->getIso() fails.
I removed the ->getIso() and the Post will be storred at database, but not marked as sceduled. It will be posted, with a date in future… how to fix it.
Or short: How i can scedule a Post using XMLRPC / metaWeblog.newPost
I hope anyone of u can help me solve this Problem. I dont want do store future posts at a database and post it by a cronjob.
greetings
Alexander Kurtz
]]>I am trying to use newMediaObject function to upload a file using Java. In general, this is how my code looks:
XmlRpcClient client = getClient();
Map<Object, Object> fileData = new HashMap<Object, Object>();
fileData.put("name", fileName);
fileData.put("type", type);
fileData.put("bits", fileBytes);
fileData.put("overwrite", Boolean.TRUE);
Object[] params = new Object[]{new Integer(0), username, password, fileData};
Object uploadResult = client.execute("metaWeblog.newMediaObject", params);
Everything works well but one thing. The file gets uploaded and it looks good but the problem is that the “overwrite” part seems to be not working. Any time I run this code, a new file gets uploaded, even though I am always using the same file name. A number gets appended to the file name.
Also, “wpid-” is prepended to the file name for some reason. So if my file name is “image.png”, after executing this, the WordPress has an image uploaded with a name “wpid-image.png”. If I run it again, I get “wpid-image1.png”.
When I set “overwrite” to Boolean.FALSE, it obviously still does not overwrite but this time nothing gets prepended to the file name, so I have “image.png”.
Please let me know if I am doing something incorrect in my code and also please let me know how would an example code look when I want the uploaded file to overwrite the existing file.
]]>I am using XMl-RPC via PHP and the metaWeblog API to edit existing WP posts. These posts have tags and one custom field.
Using the editPost API, I can supply tags (“keywords”) to WordPress, but doing this only ADDS those tags to the existing post. I don’t know how to remove any tags already attached to that post that I no longer want. In other words, I’d like to add AND remove tags for a post via XML-RPC.
On a related note, the custom field. Each post has one custom field, let’s call it “custom1”. This field is created with the initial post and is assigned a value, say “value1”.
I can’t figure out how to edit “value1” via XML-RPC. Again, I can pass custom field data through the metaWeblog editPost API. But if I pass “custom1” => “value2”, it creates a SECOND custom field with “value2”. Now I have two custom fields. I want to REPLACE the existing custom field (or delete it, and add a new one with the same name and new value).
Any ideas? Is it possible to edit WP posts with this level of detail via the XML-RPC API?
thanks!
]]>