Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 14:23

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[JS] Facebook-Like erkennen mit JavaScript

Discussion on [JS] Facebook-Like erkennen mit JavaScript within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2012
Posts: 32
Received Thanks: 5
[JS] Facebook-Like erkennen mit JavaScript

Ist es möglich mit JavaScript ein like zu ermitteln ?
oder ist das überhaupt erlaubt ? (Weiß ich ja net)

Also man klickt auf "Gefällt mir" und dann wird ein Script ausgeführt
der z.b ein Download ermöglicht ?

So das man erst liken muss und dann kann man Downloaden.
MostTronics© - Korb is offline  
Old 04/15/2012, 19:16   #2
 
Project Rivalry's Avatar
 
elite*gold: 0
Join Date: Apr 2010
Posts: 1,674
Received Thanks: 229
facebook api ? da müsste sowas bestimmt mit drin sein

Project Rivalry is offline  
Old 04/15/2012, 19:19   #3
 
elite*gold: 0
Join Date: Jun 2005
Posts: 598
Received Thanks: 27
Quote:
Originally Posted by GAMER19951 View Post
facebook api ? da müsste sowas bestimmt mit drin sein

nein - damit geht das nicht

"like-ermittlung" geht mit einem Code .. der sicht "Content locker" schimpft .. ist schon in der grauzone und geht in richtung "nicht so gerne gesehn" : ) ist auch nicht so ganz kostenlos ;-)
hehelol is offline  
Old 04/15/2012, 21:45   #4


 
Whoknowsit's Avatar
 
elite*gold: 146
Join Date: May 2009
Posts: 3,764
Received Thanks: 6,974
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.
Whoknowsit is offline  
Old 04/15/2012, 22:48   #5
 
elite*gold: 0
Join Date: Jun 2005
Posts: 598
Received Thanks: 27
Quote:
Originally Posted by Whoknowsit View Post
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 ?
hehelol is offline  
Old 04/16/2012, 15:13   #6
 
Heberg's Avatar
 
elite*gold: 209
Join Date: Oct 2009
Posts: 947
Received Thanks: 210
Du kannst auch mithilfe des "preg_matches" Tag (PHP) Die Variable vor und nach drücken rausfinden.
Heberg is offline  
Old 04/16/2012, 15:22   #7

 
boxxiebabee's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,222
Received Thanks: 500
Hier ist ne JS SDK:
Habs noch nicht probiert, sieht aber ganz nett aus.
boxxiebabee is offline  
Reply


Similar Threads Similar Threads
DB - onklick
04/11/2011 - Metin2 Private Server - 2 Replies
Hi epvpers, ich finde in der DB ( item_proto @player ) nicht die onklick zeile o.O . Wo ist die denn? MfG Nickelback93



All times are GMT +1. The time now is 14:24.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.