采用HTTP basic认证,如下所示: ######################### # function: twitter auth # return value: twitter user status json # author: Yujie # date: 2009.06.15 ######################### my $browser = LWP::UserAgent->new(); $browser->credentials( 'twitter.com:80', 'Twitter API', ARGS{email}, $ARGS{password} ); my $response = $browser->get('http://twitter.com/account/verify_credentials.json');