editfriends delete?

Dec 30, 2010 00:10

`I am trying to delete some friends using xml-rpc.

my xml )

client, client: friends, client: xmlrpc

Leave a comment

Comments 9

jfelectron December 31 2010, 01:59:36 UTC
The response is empty, however it does work! As long as a faultstring isn't returned you can assume it worked.

Reply

mcfnord December 31 2010, 06:56:03 UTC
But it doesn't. :(

LJ.XMLRPC.editfriends

username

ljfound

password

asdf

delete

username

jfelectron

username

ljfound

username

mcfnord

ljfound added you, and was not able to un-add you using XML-RPC. The robot is crying!

That XML-RPC above shows this response:

Thank you for telling me this is the proper response to a successful delete command. However, the deletes have not succeeded. Deleting myself could be a problem here? Cry, cry, cry. Do you use this command successfully?

Reply

delete---->Array not delete---->Array of Structs jfelectron December 31 2010, 18:06:38 UTC

I do use the method successfully. I can add and delete myself and anyone else without issue. I don't pass a struct to delete, simply an array of user names. In other words, the main parameters struct has a key 'delete' with a value that is simply an array of usernames that you want to delete. I would have caught this last night, but I didn't actually look at your XML :/.

Reply

Re: delete---->Array not delete---->Array of Structs mcfnord January 3 2011, 06:23:34 UTC
I've removed the element but the result was a fault.

Could you paste code that works?

Because this doesn't work:


... )

Reply


jfelectron January 3 2011, 22:53:41 UTC
Why are you generating raw XML? What language are you using? Is an XMLRPC client not available?

That's not correct syntax for an XMLRPC array

see http://www.xmlrpc.com/spec.

Check this against above, I'm just writing this on the fly. I use a Java XMLRPC client, but I know there are clients available for many languages.

delete

mcfnord
jfelectron

Reply

jfelectron January 3 2011, 23:03:20 UTC

Ahh...LJ strips all tags. It ignores
and . Here you go:

http://pastebin.com/Bwbq5jDF

Reply

mcfnord January 4 2011, 03:50:13 UTC
Here's that code:

delete

jfelectron
mcnfnord
ljfound

And it works!

Why did I use raw XML? I thought I could wing it! I've embedded this in PHP that now works nicely. One lesson: If I'm not using an XML-RPC library, at least look for a validator I can use!

I have extended your paid account a small measure so others might benefit from your awesomeness.

Reply

jfelectron January 4 2011, 17:38:47 UTC
Oh thanks man! Glad that did the trick for you. What is ljfound, some strange crawler driven thing?

Reply


Leave a comment

Up