在配置文件框中显示另一个文件的内容
我被这个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我讨厌传递坏消息,但个人资料框和框选项卡 走了。
它们将被应用程序选项卡取代。
换句话说,您将无法再在用户的个人资料上显示自定义内容。这一切都必须进入特定于应用程序的选项卡。
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.