editfriends XML-RPC issue.

Jun 16, 2008 03:43

Hi!

I'm trying to get my PHP-based XML-RPC client update friends' lists using the editfriends method, but I'm getting an odd response. Here's my PHP code:

require('Configuration/Configuration.php');
require($FunctionRoot . 'xmlrpc.php');

// LJ XML-RPC Variables
$add = array();
$add['username'] = 'user_to_be_friended';
$add['fgcolor'] = '#00688B';
XMLRPC_prepare($add,'struct');

$array = array();
$array['username'] = 'professormass';
$array['password'] = 'my_password';
$array['add'] = $add;

XMLRPC_prepare($array,'struct');

$result = XMLRPC_request('www.livejournal.com','/interface/xmlrpc','LJ.XMLRPC.editfriends', array($array));

I get this response:

Application failed during request deserialization: wrong element 'username'

Virtually the exact same code works for using the postevent method. Anybody have any clues on this one?

client, code: php, client: friends, client: xmlrpc

Previous post Next post
Up