I know this seems a little off-topic, but I have been looking all over the web for info on how to make a Facebook app in perl, i.e., mod_perl/HTML::Mason. Nobody on FB's forums knows anything about it, so I figured maybe I'd try over here, on the reasoning that the world of Perl devs may have more FB experience than the world of FB devs has perl experience.
I cannot get my FBML to render properly. Either I get output on my URL or 404 errors on FaceBook's URL. My canvas page url is http://apps.facebook.com/metalabel/ I am using FBML, and it is a website. (If I use iframe, everything works great, but that looks terrible.) My callback url is http://www.metalabel.com/networks/facebook/facebook.html/ At that location is a Mason template that checks whether I have an auth_token. if not, it redirects them back to Facebook: print STDERR "Auth_token not yet granted\n"; print STDERR Dumper %ARGS; print STDERR "Redirecting...\n"; print qq{<fb:redirect url="http://www.facebook.com/login.php?api_key=$appapikey&v=1.0" />}; When they come back with an auth_token, my script is supposed to get some user info and display it on the canvas: print STDERR "Auth_token granted: $auth_token\n"; print STDERR Dumper %ARGS; $facebook->auth->get_session($auth_token); $user_id = $facebook->users->get_logged_in_user; if ($user_id) { print STDERR "User session granted...\n"; print STDERR "User ID: $user_id\n"; $friends = $facebook->friends->get or die "Friends array not created: $!\n"; print STDERR "Friends array created...\n"; print STDERR "Friends: ", Dumper $friends, "\n"; print "<fb:title>Metalabel</fb:title>"; print qq{<fb:subtitle>Hello, <fb:user-item uid=\"$user_id\" useyou=\"false\" />$user_id</fb:subtitle>}; print "<fb:subtitle>Friends:</fb:subtitle>"; foreach my $friend (@$friends) { print "<fb:user-item uid=\"$friend\" />"; } } All very simple! But the printed output is not displayed on Facebook. Facebook sends the user to my site instead of rendering the output in their site. In case this is confusing, what I mean is that after the redirect, I end up at http://www.metalabel.com/networks/facebook/facebook.html?auth_token=345234525234..., and the page is just MetalabelHello, XXXXXXXXXX Friends: (I XXXed out my user id). The source code has the user id and friend ids and everything. if it was on Facebook, it would be perfect. If anyone has had any experience here, I'd greatly appreciate it. Amiri -- View this message in context: http://www.nabble.com/Anybody-Made-a-FaceBook-App-in-Mason--tp20630892p20630892.html Sent from the Perl Mason - Users mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users