WWW:Facebook::perl中使用的API

WWW:Facebook::perl中使用的API,facebook,perl,Facebook,Perl,我得到了www:Facebook:api的perl和CPAN版本 在/usr/share/perl5/WWW/Facebook/API/Auth.pm第62行的哈希元素中使用%字段中的未初始化值时出错。 我定义了所有键 #!/usr/bin/perl -w use strict; use warnings; use CGI; use WWW::Facebook::API; use WWW::Facebook::API::Auth;

我得到了www:Facebook:api的perl和CPAN版本

在/usr/share/perl5/WWW/Facebook/API/Auth.pm第62行的哈希元素中使用%字段中的未初始化值时出错。 我定义了所有键

      #!/usr/bin/perl -w

     use strict;
     use warnings;
     use CGI;
     use WWW::Facebook::API;
     use WWW::Facebook::API::Auth;

     use HTTP::Request;
     use LWP;

     my $TMP    = $ENV{HOME}.'/tmp';

     my $facebook_api      = '--------';
     my $facebook_secret   = '-------';
     my $facebook_clientid = '--------';

     my $gmail_user        = '-------';
     my $gmail_password    = '--------';

     my $client = WWW::Facebook::API->new(

     desktop         => 1,
     api_version     => '1.0',
     api_key         => $facebook_api,
     secret          => $facebook_secret,
     throw_errors    => 1,     
     );

     $client->app_id($facebook_clientid);

     local $SIG{INT} = sub {
     print "Logging out of Facebookn";
     my $r = $client->auth->logout;
     exit(1);
      };

     my $token = $client->auth->create_token;
     print "$token \n";

     $client->auth->get_session($token);
     print "$client \n";

WWW::Facebook::API看起来已经有一段时间没有更新了。该文件的第62行是:

$self->base->{ $field{$key} } = $resp->{$key};
未定义的值是
$字段{$key}
部分。
%字段
哈希是Facebook API已知字段名称(即Facebook返回给您的数据中的字段)与模块希望调用的名称之间的硬编码映射。Facebook似乎在其数据中添加了一些额外的字段,而该模块尚未更新以处理这些字段

说到底,这只是一个警告;如果你愿意,你可以忽略它。如果希望脚本的输出更整洁,可以将该行更改为:

$self->base->{ $field{$key} } = $resp->{$key} if defined $field{$key};

当我运行我的代码时,我得到一个32长度的字母数字加密身份验证令牌。我如何解密它并将其用作原始身份验证令牌。response={“error_code”:100,“error_msg”:“Invalid parameter”,“request_args”:[{“key”:“api_key”,“value”:“getting 15位值”},{“key”:“auth_token”,“value”:“32长度字母数字键”},{“key”:“call id”,“value”:“getting 15位十进制值”},{“key”:“format”,“value”:“JSON”},{“key”:“method,“value”:“facebook.auth.getSession”},{“key”:“v”,“value”:“1.0”},{“key”:“sig”,“value”:“32 getting length key”}]}现在没有收到警告,但仍然收到此错误