Skip Menu |

This queue is for tickets about the WWW-Myspace CPAN distribution.

Report information
The Basics
Id: 35243
Status: resolved
Worked: 15 min
Priority: 0/
Queue: WWW-Myspace

People
Owner: GRANTG [...] cpan.org
Requestors: theartofweb [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
Subject: Re: [rt.cpan.org #35243] how to get all friends
Date: Sun, 20 Apr 2008 16:18:03 -0700
To: bug-WWW-Myspace [...] rt.cpan.org
From: Grant Grueninger <grantg [...] spamarrest.com>
Hi Steven, That's a known bug since a recent change in myspace's form handling and we haven't had time to fix it yet. If you're good with perl programming, feel free to dig into the Myspace.pm module's "get_friends" method and submit a patch (see "CONTRIBUTING" at the bottom of the Myspace.pm docs). Otherwise, hopefully this bug will be fixed soon. Grant On Apr 20, 2008, at 12:40 PM, THEARTOFWEB via RT wrote: Show quoted text
> > Sun Apr 20 15:40:04 2008: Request 35243 was acted upon. > Transaction: Ticket created by theartofweb@hotmail.com > Queue: WWW-Myspace > Subject: how to get all friends > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: theartofweb@hotmail.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=35243 > > > > > 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"; > } > > } > _________________________________________________________________ > Vorresti un pub diverso dal solito? Cercalo con Live Search Maps! > http://maps.live.it >
-- Grant Grueninger grantg@spamarrest.com
Duplicate of ticket#34821