perl - WWW:Facebook:Api Auth Token -
-----------------------------here received 32 length key auth_token error during rest auth.getsession call: params = api_key:-------------- auth_token:------------------------------- call_id:------------.-----[like decimal values format:json method:facebook.auth.getsession v:1.0 response = {"error_code":100,"error_msg":"invalid parameter","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)
i need convert received auth_token how ? how can validate received 1 correct key or not.
#!/usr/bin/perl -w use strict; use warnings; use cgi; use www::facebook::api; use www::facebook::api::auth; use http::request; use lwp; $tmp = $env{home}.'/tmp'; $facebook_api = '--------'; $facebook_secret = '-------'; $facebook_clientid = '--------'; $gmail_user = '-------'; $gmail_password = '--------'; $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"; $r = $client->auth->logout; exit(1); }; $token = $client->auth->create_token; print "$token \n"; $client->auth->get_session($token); print "$client \n";
www:facebook:api deprecated (last version - 12 mar 2010). seems api broken. should use facebook::graph instead.
Comments
Post a Comment