Perl Snippets
From Facebook Developer Wiki
Revision as of 02:32, 8 June 2007 by 10.8.254.7 (Talk)
# Retrieve Data stored in key value pairs in
# comment blocks within the FBML of a user's
# profile box.
sub getData {
my $id = shift;
my %data;
$_ = $fbk->profile->get_fbml(uid => $id);
while ( /<!--(.*)-->/g ) {
$_ = $1;
while ( /(\S+)\s+(\S+)/g ) {
$data{$1} = $2;
}
}
return %data;
}
