FB graphics not loading?
I am trying to simply add the like button to my simple website and I don't get any graphics at all. I went to AddThis and their implementation doesn't work either. Is my system not setup correctly or am I making a rookie mistake. Here is the code and all I get is a red box with the paragraph. Thanks for any help!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml: lang="en" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:fb="http://ogp.me/ns/fb#">
<head>
<title>Facebook button test</title>
</head>
<body>
<style type="text/css">
.content p {
border:开发者_运维技巧 1px solid red;
position: relative;
}
.fb-root {
border: 3px solid blue;
height: 200px;
width: 500px;
padding: 1em;
float: right;
}
.fb-like {
border: 10px solid green;
padding: 1em;
}
</style>
<div class="content">
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<fb:like href="facebook.com/burgessfww" send="true" layout="button_count" width="450" show_faces="false"></fb:like>
<p> Some text to take up some space and see what's happening!</p>
</div>
</body>
</html>
I think the problem is simple... but since I didn't test it You should!
<html xmlns="http://www.w3.org/1999/xhtml" xml: lang="en" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:fb="http://ogp.me/ns/fb#">
This seems to be your mistake: XMLNS:FB twice
xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:fb="http://ogp.me/ns/fb#"
change it to
xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://ogp.me/ns/fb#"
best regards
精彩评论