我试图使用“任何发明”:Twitter:Stream模块,我想提一个文件,列出Twitter uids,我想照此办理。 我可以把女子放在法典本身,并做如下工作:
my $done = AnyEvent->condvar;
my $nt_filter = AnyEvent::Twitter::Stream->new(
username => $cf{account},
password => $cf{password},
method => filter ,
follow => 15855509,14760150,18598536 ,
on_tweet => sub {
#some code.....
},
on_error => sub {
my $error = shift;
debug "ERROR: $error";
},
timeout => 45,
);
$done->recv;
但是,当我试图使用同样档案时:
my $done = AnyEvent->condvar;
my $nt_filter = AnyEvent::Twitter::Stream->new(
open UID_FILE, "/tmp/uids" or die $!;
my @uid_line = <UID_FILE>;
username => $cf{account},
password => $cf{password},
method => filter ,
follow => @uid_file,
on_tweet => sub {
#some code....
},
on_error => sub {
my $error = shift;
debug "ERROR: $error";
},
timeout => 45,
);
$done->recv;
它失败了。 The uids file has the following content:
15855509,14760150,18598536
I m从Twitter中发现406个错误,表明格式不正确。 猜测引言不正确?