Parsing results of facebook.friends.getAppUsers

Jul 2, 2007 at 9:19 PM
Edited Jul 2, 2007 at 9:20 PM
Using ASP/VBScript:
I'm looking for a way to parse the XML for the count of uid's returned from facebook.friends.getAppUsers. Any ideas - or alternative methods, such as using FQL - are much appreciated!

Example output:
<friendsgetAppUsersresponse xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema_instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true">
<uid>123456</uid>
<uid>234567</uid>
</friendsgetAppUsersresponse>
Coordinator
Jul 2, 2007 at 9:22 PM
Have you tried creating an interop version of the Facebook.dll and calling our methods that do the parsing for you.

Admittedly, I have not tried this. But, seems like it might work. You could then call the interop dll from vbscript.

Any chance, you can move to asp.net?
Jul 3, 2007 at 12:03 AM
What methods might you be speaking of (that do the parsing)?

I'm not quite positive if my hosting plan supports asp.net, but I've been coding in classic ASP/VBScript for so long that it's just what I'm used to. Interacting with these sorts of XML results aren't something I've done much of until recently.

I could probably just parse through using some sort of Instr function and look for the presence of the <uid> tag, keeping track of the occurrence and using that as the subsequent starting point, if applicable - just incrementing some counter as I go.
Coordinator
Jul 3, 2007 at 1:47 PM
Are you using the FacebookService component from our Facebook.dll. This class has methods that wrap the various API calls and return strongly typed objects instead of xml. Like GetFriends returns a collection of facebook user entities.

Like I said, I'm not sure it will work from COM, but worth a shot I guess.