Skip Menu |

This queue is for tickets about the WWW-Facebook-API CPAN distribution.

Report information
The Basics
Id: 30630
Status: resolved
Priority: 0/
Queue: WWW-Facebook-API

People
Owner: unobe [...] cpan.org
Requestors: ajaxdwr [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Cannot execute the demo: Session_Key undefined
Date: Fri, 9 Nov 2007 22:41:36 -0500
To: bug-www-facebook-api [...] rt.cpan.org
From: "Rob Giberson" <ajaxdwr [...] gmail.com>
I tried to execute the demo from http://search.cpan.org/src/UNOBE/WWW-Facebook-API-v0.4.7/README and got the following error: Token needed for call to get_session at ./test.pl line 22 and I realize that this is not a desktop app, so I comment this: # not needed if web app (see $client->canvas->get_fb_params) # $client->auth->get_session( $token ); and got this error: Error during REST friends.get call: params = api_key:2872dcd5cab21415b0473869c84b7916 format:JSON method:facebook.friends.get secret:92c9d73e6dbb269c7a260c0b69e2b1d4 session_key: v:1.0 response = {"error_code":102,"error_msg":"Session key invalid or no longer valid","request_args":[{"key":"api_key","value":"2872dcd5cab21415b0473869c84b7916"},{"key":"format","value":"JSON"},{"key":"method","value":"facebook.friends.get"},{"key":"secret","value":"92c9d73e6dbb269c7a260c0b69e2b1d4"},{"key":"session_key","value":""},{"key":"v","value":"1.0"},{"key":"sig","value":"5efba67acf06384f0ab1fd28a1994c28"}]} at /usr/lib/perl5/site_perl/5.8.5/WWW/Facebook/API.pm line 204 WWW::Facebook::API::call('WWW::Facebook::API=HASH(0x7f32e0)', 'friends.get') called at /usr/lib/perl5/site_perl/5.8.5/WWW/Facebook/API/Friends.pm line 15 WWW::Facebook::API::Friends::get('WWW::Facebook::API::Friends=HASH(0x8f9770)') called at ./test.pl line 25
Subject: Re: [rt.cpan.org #30630] Cannot execute the demo: Session_Key undefined
Date: Sat, 10 Nov 2007 17:56:19 -0800
To: Rob Giberson via RT <bug-WWW-Facebook-API [...] rt.cpan.org>
From: David Romano <unobe [...] cpan.org>
Hi Rob, Rob Giberson via RT wrote on Fri, Nov 09, 2007 at 07:42:03PM PST: Show quoted text
> I tried to execute the demo from > http://search.cpan.org/src/UNOBE/WWW-Facebook-API-v0.4.7/README > and got the following error: > > Token needed for call to get_session at ./test.pl line 22 > > and I realize that this is not a desktop app, so I comment this: > # not needed if web app (see $client->canvas->get_fb_params) > # $client->auth->get_session( $token );
You still need to set the session key for the $client. Notice the error message: Show quoted text
> Error during REST friends.get call: > params = > api_key:2872dcd5cab21415b0473869c84b7916 > format:JSON > method:facebook.friends.get > secret:92c9d73e6dbb269c7a260c0b69e2b1d4 > session_key: > v:1.0 > ....
The session_key value is blank. You might want to look at facebook-canvas-json in the examples directory. - David -- "If any common program is impossible, if there is no such thing as an education that everybody ough to have, then we must admit that any community is impossible." -- Robert Maynard Hutchins, The Great Conversation
Subject: Re: [rt.cpan.org #30630] Cannot execute the demo: Session_Key undefined
Date: Sun, 11 Nov 2007 09:58:27 -0500
To: bug-WWW-Facebook-API [...] rt.cpan.org
From: "Rob Giberson" <ajaxdwr [...] gmail.com>
Hi David, Thanks for your reply. How do I run this facebook-canvas-json. I've set up the path, key and so on. Just place it under my serverlet? Say tomcat/webapps/ROOT ? Thanks, Rob. On Nov 10, 2007 8:57 PM, unobe@cpan.org via RT <bug-WWW-Facebook-API@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=30630 > > > Hi Rob, > Rob Giberson via RT wrote on Fri, Nov 09, 2007 at 07:42:03PM PST:
> > I tried to execute the demo from > > http://search.cpan.org/src/UNOBE/WWW-Facebook-API-v0.4.7/README > > and got the following error: > > > > Token needed for call to get_session at ./test.pl line 22 > > > > and I realize that this is not a desktop app, so I comment this: > > # not needed if web app (see $client->canvas->get_fb_params) > > # $client->auth->get_session( $token );
> You still need to set the session key for the $client. Notice the error > message: >
> > Error during REST friends.get call: > > params = > > api_key:2872dcd5cab21415b0473869c84b7916 > > format:JSON > > method:facebook.friends.get > > secret:92c9d73e6dbb269c7a260c0b69e2b1d4 > > session_key: > > v:1.0 > > ....
> The session_key value is blank. You might want to look at > facebook-canvas-json in the examples directory. > > - David > > -- > "If any common program is impossible, if there is no such thing as an > education that everybody ough to have, then we must admit that any > community is impossible." > -- Robert Maynard Hutchins, The Great Conversation > >
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #30630] Cannot execute the demo: Session_Key undefined
Date: Sun, 11 Nov 2007 13:07:18 -0800
To: Rob Giberson via RT <bug-WWW-Facebook-API [...] rt.cpan.org>
From: David Romano <unobe [...] cpan.org>
Hi Rob, Rob Giberson via RT wrote on Sun, Nov 11, 2007 at 06:58:52AM PST: Show quoted text
> Thanks for your reply. How do I run this facebook-canvas-json. I've > set up the path, key and so on. > Just place it under my serverlet? Say tomcat/webapps/ROOT ?
With web-based, you have to pass in the api key, secret key, and app path to the constructor, and then place the script at the callback url you specified in the Facebook setup for your application. For instance, when using the web-based example, you might have the following callback url (note the trailing slash): http://www.example.com/facebook-canvas-json/ You have to make sure the required Perl modules are in the C<@INC> path for the web server process, otherwise there will be a 500 Internal Server error.The easiest way to do that is to put the following at the top of the examplescript (as long as "path-to-perl5-libs" is readable by the web server process): use lib "path-to-perl5-libs"; HTH, - David -- "All men are different; but they are also all the same. As we must all become specialists, so we must all become men." -- Robert Maynard Hutchins, The Great Conversation
Version 0.4.8 documentation now includes a FAQ for this.