Quote:
Originally Posted by Whoknowsit
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>
<script type="text/javascript">
$("document").ready(function () {
var fbappID = 131387333558417; // Anpassen!
var likeURL = 'http://elitepvpers.com/forum/web-development/1830158-js-facebook-like-erkennen-mit-javascript.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 () {
window.location = 'http://url-zum-download.tld/datei.ext';
});
};
$('body').append('<fb:like href="' + likeURL + '" width="450" height="60" show_faces="false" font="lucida grande" layout="normal" action="like" colorscheme="light"/>');
});
</script>
</body>
</html>
Du brauchst jedenfalls eine AppID.
|
wenn ich das richtig sehe .. ist das nu eine Umleitung bei event .. der Content kann aber auch ohen like erreicht werden.
Du gibst hier ja nur nach dem Like eine URL mit.
oder sehe ich das falsch ?