在配置文件框中显示另一个文件的内容

发布于 2024-08-29 02:15:42 字数 1525 浏览 2 评论 0原文

我被这个 Facebook 应用程序困住了,不知道如何继续。

对于画布,该应用程序运行得相当完美。我有两个页面,quote.html 和quote.php。在 quote.html 中,quote.php [从数据库获取报价] 通过 ajax 调用,随机显示报价 10 秒。

然而,对于墙壁选项卡/配置文件框,我似乎不知道哪里出错了。我创建了一个名为“profile_box.php”的页面,调用 quote.php 获取报价,setFBML。虽然这适用于画布[无时间],但它不会在墙上选项卡上显示任何内容。

<?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 />";

?>

有人可以指点一下吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

流云如水 2024-09-05 02:15:42

我讨厌传递坏消息,但个人资料框和框选项卡 走了

它们将被应用程序选项卡取代。

换句话说,您将无法再在用户的个人资料上显示自定义内容。这一切都必须进入特定于应用程序的选项卡。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文