Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use Net::Twitter;
- $user = shift ;
- $pass = shift ;
- #slug of the list, not the name, mind you ....
- $list = shift ;
- $user2 = shift ;
- $pass2 = shift ;
- #slug of the list, not the name, mind you ....
- $list2 = shift ;
- my $nt = Net::Twitter->new(
- traits => [qw/API::Lists/, 'InflateObjects'],
- decode_html_entities => 1,
- username => $user,
- password => $pass );
- my @members;
- for ( my $cursor = -1; $cursor; ) {
- my $r = $nt->list_members($user, $list, { cursor => $cursor });
- push @members, @{$r->users};
- $cursor = $r->next_cursor; }
- my $new = Net::Twitter->new(
- traits => [qw/API::REST API::Search API::Lists/],
- decode_html_entities => 1,
- username => $user2,
- password => $pass2 );
- foreach $tweeter (@members)
- {
- print $tweeter->{'screen_name'} . "\n" ;
- $new->add_list_member($user2, $list2,{id => $tweeter->{id}}) ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement