Ejemplo n.º 1
0
?>
		</div>
		<textarea name="comment" rows="5" cols="30"></textarea><br />
		<input type="submit" value="Submit Comment"/>
	    </form>

	    <fb:comments title="Facbook Comments on my comments... lol"></fb:comments>
	</div>
	<script type="text/javascript">
	    function update_user_box() {
		var user_box = document.getElementById("user");
		// add in some XFBML. note that we set useyou=false so it doesn't display "you"
		user_box.innerHTML =
		    "<span>"
			+ '<?php 
echo FB::profile_pic();
?>
'
			+ 'Welcome, <?php 
echo FB::name(array('useyou' => 'false'));
?>
. You are signed in with your Facebook account.'
			+ "</span>";
		// because this is XFBML, we need to tell Facebook to re-process the document
		FB.XFBML.Host.parseDomTree();
	    }
	    <?php 
echo FB::js_init();
// To do it with javascript = FB::js_init(array('ifUserConnected' => 'update_user_box'));
?>
	</script>