----------------------------- REST auth.getSession 呼び出し中に 32 の長さのキー auth_token エラーを受け取りました: params = api_key:--- ----------- auth_token:------------------------------- call_id:---- ------.-----[小数値形式のように:JSON メソッド:facebook.auth.getSession v:1.0 response = {"error_code":100,"error_msg":"無効なパラメータ", "request_args":[
{"key":"api_key","value":"---------------"},
{"key":"auth_token","value":"----------------------"},
{"key":"call_id","value":"-------------------"},
{"key":"format","value":"JSON"},
{"key":"method","value":"facebook.auth.getSession"},
{"key":"v","value":"1.0"},
{"key":"sig","value":"f253b75e337776756a1fba88f085c269"}]}
WWW::Facebook::API=HASH(0xa203ce8)
受信した auth_token を変換する必要があります。その方法を教えてください。1 つの正しいキーを受け取ったかどうかを検証するにはどうすればよいですか。
#!/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";