views:

43

answers:

1

i'm stuck at this facebook application, not knowing how do i go ahead.

for the canvas, the app works quite perfectly. i've two pages, quote.html and quote.php. in quote.html, quote.php [which gets the quotes from the database] is called through ajax which displays a quote randomly for 10 secs.

however, for the wall tab/profile box, i can't seem to know where i'm going wrong. i created a page called 'profile_box.php', call quote.php for the quotes, setFBML. while this works on canvas [sans the timing], it doesn't display anything on the wall tab.

<?php

include 'quote.php';


$row = mysql_fetch_array($result, MYSQL_ASSOC);
if ( !$row ) {
  echo "Empty";
}
else{

$fb_box = "<p>" . h($row['cArabic']) . "</p>";
$fb_box .= "<p>" . h($row['cQuotes']) . "</p>";
$fb_box .= "<p>" . h($row['vAuthor']) . "</p>";
$fb_box .= "<p>" . h($row['vReference']) . "</p>";
}

try{

    $url="http://website/name/quote.html";
    $facebook->api_client->fbml_refreshRefUrl($url);

    $fbml = "<fb:ref  url='$url'/>";

    if(isset($_REQUEST['fb_sig_page_id'])){
        $page_id = $_REQUEST['fb_sig_page_id'];
        $profile_type = $_REQUEST['fb_sig_type'];
        $facebook->api_client->profile_setFBML($appapikey, $page_id, "$fbml", NULL, NULL, "$fb_box");
    }
    else {
        $is_tab = isset($_REQUEST['fb_sig_in_profile_tab']);
        if( !$is_tab ) $user_id = $facebook->require_login();
        $result = $facebook->api_client->profile_setFBML($appapikey, $user_id, "$fbml", NULL, NULL, "$fb_box");
    }
}
catch(Exception $ex){
    echo 'Caught exception: ',  $ex->getMessage(), "\n";
}


echo "<fb:add-section-button section=\"profile\" /><br />";

?>

can anyone please give any pointers?

A: 

I hate to be the bearer of bad news, but Profile Boxes and the Boxes Tab are gone.

They are being replaced with Application Tabs.

In other words, you will no longer be able to display custom content on a user's profile. It all has to go into a application-specific tab.

Peter Bailey