facebook app using fbml displays nothing

Posted by fusion on Stack Overflow See other posts from Stack Overflow or by fusion
Published on 2010-04-11T21:29:03Z Indexed on 2010/04/11 21:33 UTC
Read the original article Hit count: 258

Filed under:
|
|
|
|

i've made an app in php and html and trying to integrate it with fb. the app on my website is using jquery, but knowing that fbml doesn't support jquery, i've tried to instead use fbjqry. this doesn't work either. i'm not sure where i'm going wrong.

/////////////// index.php:

<?php
// Copyright 2007 Facebook Corp.  All Rights Reserved. 

require_once 'config_fb.php';

//***** Greet the currently logged-in user!
echo "<p>Hello, <fb:name uid=\"$user_id\" useyou=\"false\" />!</p>";

include 'quote.html';
?>

///////////////// quote.html:

<!DOCTYPE html>
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
<link rel="stylesheet" type="text/css" href="css/jquote.css" />
<!--<script type="text/javascript" src="scripts/jquery-1.4.2.js"></script>-->
<script type="text/javascript" src="fbjqry/utility.js"></script>
<script type="text/javascript" src="fbjqry/fjqry.js"></script>
<script type="text/javascript">
// On page load, fill the box with content.
$(document).ready(function() {
$("#quoteContainer").load("quote.php");
});

var auto_refresh = setInterval(
function ()
{
   $('#quoteContainer').load('quote.php');
}, 5000); // refresh every 10000 milliseconds
</script>

</head>

<div id="wrapper">
<div class="header">&nbsp;Quote of the Day</div>
<div id="quoteContainer">
</div>
</div>

</html>

//// from the above file it should take quotes from quote.php and display it, but it doesn't display anything. it seems as though it isn't reading from the quote.php file. is the command of fbjqry different from jquery?

if i use iframes instead of fbml, everything loads correctly except that i'd like tab/profile box for this app, which iframes doesn't have.

© Stack Overflow or respective owner

Related posts about fbml

Related posts about iframe