Skip to content

Instantly share code, notes, and snippets.

@h3h h3h/gist:417878
Created May 28, 2010

Embed
What would you like to do?
Test case for an XFBML bug in Facebook's connect-js library.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>XFBML Bug</title>
</head>
<body>
<p>
You should see your name here:
<fb:name uid="loggedinuser" useyou="false"></fb:name>
</p>
<p>
Don't see it? <a href="" onclick="location.reload();">Reload the page</a>.
</p>
<p>
Normally <code>fb:name</code> with a numeric <code>uid</code> works fine,
but it also won't render if <code>uid="loggedinuser"</code> is on the
same page:
<fb:name uid="4" useyou="false"></fb:name>
</p>
<p>
Want to see it again? Delete your <code>fbs_*</code> domain cookie.
</p>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: "[APP_ID_HERE]", status: true, cookie: true, xfbml: true});
};
(function() {
var e = document.createElement("script");
e.async = true;
e.src = window.location.protocol + "//connect.facebook.net/en_US/all.js";
document.getElementById("fb-root").appendChild(e);
}());
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.