Trying to parse Facebook FQL response with String.Split in webplayer; no luck

I finally worked out how to do it on the html side of things, I am successfully getting the entire response.data into a String ( which I have verified with console.log ) and sending it to the Unity webplayer.
But then I am failing to decode it in Unity, which should have been the easy part.

I can’t figure out what I’m doing wrong here.

function ParseFQLResponse (inString : String)
{
var chopChar : char[] = new char[1];
chopChar[0] = ";"[0];
var diceChar : char[] = new char[1];
diceChar[0] = ","[0];

var chop : String[] = inString.Split(chopChar);
for (var p : int = 0; p < chop.Length; p++)
	{
	var dice : String[] = chop[p].Split(diceChar);
	if (dice.Length == 4)
		{
		fbFriendIDs.Add(dice[0]);
		fbFriendNames.Add(dice[1]);
		fbFriendsOnline.Add(dice[2]);
		fbFriendsWithGame.Add(dice[3]);
		}
	else
		{
		playerText.text = "oops "+dice.Length;
		}	
	}
playerText.text = fbFriendIDs.Count+","+fbFriendNames.Count+","+fbFriendsOnline.Count+","+fbFriendsWithGame.Count+"  "+fbFriendIDs[0]+" "+fbFriendNames[0]+" "+fbFriendsOnline[0]+" "+fbFriendsWithGame[0];
ProcessFBFriendList();	
}

This gives me the message “oops 1”. The second message never appears.

This is the Javascript function on the webpage where the player is embedded:

function OnUnityReady()
	{
	GetUnity().SendMessage("_MasterControl","PersonalizeFBData",gPlayerFBID);
	var outString = "";
	FB.api('fql', {q : 'SELECT uid, first_name, online_presence, is_app_user FROM user WHERE uid IN ( SELECT uid2 FROM friend WHERE uid1 = me())'}, function(response) {
		console.log(response.data.length);
		for (var i = 0; i < response.data.length; i++)
			{
			outString += (response.data<em>.uid + "," + response.data<em>.first_name + "," + response.data<em>.online_presence + "," + response.data*.is_app_user + ";");*</em></em></em>

* }*
* console.log(outString);*
* });*
GetUnity().SendMessage("MasterControl",“ParseFQLResponse”,outString); *
}*_

This is a classic example of why doing some testing is so critical. You’re trying to do a facebook thing, I know, but in reality, all that ParseFQLResponse() does it break up a string that you send it. So, make up some simple tests:

ParseFQLResponse("");
ParseFQLResponse("a,b,c,d;");
ParseFQLResponse("a,b,c,d;1,2,3,4;");

Obviously you’ll want to comment out the call into ProcessFBFriendList(). Do this from Unity, and add debugging code to your function to see what actually happens. My suspicion is that the Split("fred;", ";") will give you two results, fred and an empty string, where you expect to get just a single value back.