Created
May 28, 2010 23:16
-
-
Save h3h/417878 to your computer and use it in GitHub Desktop.
Test case for an XFBML bug in Facebook's connect-js library.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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