?

Log in

No account? Create an account
Problems adding/deleting friend groups. - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Problems adding/deleting friend groups. [Oct. 21st, 2003|06:22 pm]
LiveJournal Client Discussions

lj_clients

[blackmouse]
I'm writing a client with VB.NET. It's mostly functional but I'm writing the piece to deal with editing the friend groups. I can add and remove friends from groups but I cannot add or delete groups. The request I send to the server looks like "user=username&password=password&efg_delete_1&" (where 1 equals the group number). I get a success result of OK but it doesn't delete the group. pretty much the same thing with adding a group but it doesn't add the group. Can anyone point me in the right direction?
Thanks.
linkReply

Comments:
From: ex_snej373
2003-10-21 04:11 pm (UTC)
The trailing "&" seems dodgy, since ampersands separate items. And I would guess every item needs a value, so ending with something like "efg_delete_1=1" might work.

Isn't .NET supposed to be all XML-savvy? Why aren't you using the much friendlier XML-RPC API instead of the kludgy old flat one?
(Reply) (Thread)
[User Picture]From: blackmouse
2003-10-21 04:20 pm (UTC)

XML

It is XML savy but to learn how to communicate with the servers I looked through the source code for another LJ client and it was using this method. I'm eventually going to re-write those parts with the XML stuff.

I have tried it with and without the end ampersand, no change. I don't understand why it would be giving me an success value of "OK" if it's not working but it's definately not working.

I did add the "=1" and it works now. I'll keep that in mind. Thank you for your help.
(Reply) (Parent) (Thread)
[User Picture]From: quirrc
2003-10-21 07:15 pm (UTC)

Re: XML

just get that another client and look at exact requests that it's sending and compare to yours (either use some sniffer/logger or run with debugger)
(Reply) (Parent) (Thread)
From: evan
2003-10-22 08:03 am (UTC)
yeah, wrapping xml-rpc in c# is literally a few lines of code... it's pretty impressive. you tag a function prototype with [XmlRpc] and then it automagically packs and unpacks structs and everything.

here's a wrapper of the lj protocol in c# (warning: probably gpl, so don't look if that'll pollute something... but it's really trivial and c# so i doubt it applies to at least jens.)
(Reply) (Parent) (Thread)
[User Picture]From: blackmouse
2003-10-22 03:33 pm (UTC)

Problems

I've tried this wrapper and I keep getting all sorts of errors. I did convert it to VB but the conversion was pretty simple. Do you have or know of any sample code using this wrapper? Thank you for the link though, this is a step in the right direction.
(Reply) (Parent) (Thread)
[User Picture]From: blackmouse
2003-10-23 05:59 am (UTC)

Re: Problems

Nevermind, I fixed it. The problem was you have to specify that items in the structure are optional. Once I did that I got it to work just fine. Thanks for everyones help.
(Reply) (Parent) (Thread)
From: evan
2003-10-23 11:49 am (UTC)

legality

(please keep in mind that it's GPL code and that you must accept the license [which consequently requires the remainder of your code to be GPL] to use it.)
(Reply) (Parent) (Thread)