HTML Code:
<!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" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
</head>
<body>
<div id="fb-root"></div>
<script type="text/javascript">
$("document").ready(function () {
var fbappID = 131387333558417; // Anpassen!
var likeURL = 'http://www.elitepvpers.com/forum/web-development/1650502-erst-facebook-like-botton-dann-video.html'; // Anpassen!
$('body').append('<div id="fb-root"></div>');
$.getScript(document.location.protocol + '//connect.facebook.net/de_DE/all.js');
window.fbAsyncInit = function () {
FB.init({
appId: fbappID,
status: true,
cookie: true,
xfbml: true
});
// Event, wenn Like geklickt wurde
FB.Event.subscribe('edge.create', function (href, widget) {
$('#hidden').show();
});
// Event, wenn Like entfernt wurde
FB.Event.subscribe('edge.remove', function (href, widget) {
$('#hidden').hide();
});
};
$('#hidden').after('<fb:like href="' + likeURL + '" width="450" height="60" show_faces="false" font="lucida grande" layout="normal" action="like" colorscheme="light"/>');
});
</script>
<div id="hidden" style="display:none;">
Dieser Text wird erst angezeigt, wenn der Besucher auf "Like" geklickt hat.<br /><br />
</div>
</body>
</html>