Subject: | how to get all friends |
Date: | Sun, 20 Apr 2008 21:39:45 +0200 |
To: | <grantg [...] cpan.org>, <bug-www-myspace [...] rt.cpan.org> |
From: | THEARTOFWEB <theartofweb [...] hotmail.com> |
Hi,
I've been using the following script to return a list of the friends of the profile specified by the id, yet it returns only 40 friends as they are "top friends"...how can I return all its friends ??
thanks ever so much!
#!/usr/bin/perl
use strict;
use warnings;
use CGI::Carp "fatalsToBrowser";
use CGI;
use WWW::Myspace;
my $q = new CGI(); print $q->header();
my $myspace = new WWW::Myspace( human => 0, auto_login => 0 );
my @friends = $myspace->friends_from_profile( id => "60964437" );
my $num = scalar(@friends);
print "$num\n";
foreach my $friend_id ( @friends )
{
my $url = $myspace->friend_url( $friend_id );
if ( $url )
{
print "Friend\'s custom URL: http://www.myspace.com/" . $myspace->friend_url( $friend_id ) . "\n";
}
else {
print "Friend doesn\'t have a custom URL. Use: " . 'http://www.myspace.com/' . $friend_id . "\n";
}
}
Show quoted text
_________________________________________________________________
Vorresti un pub diverso dal solito? Cercalo con Live Search Maps!
http://maps.live.it