I need to show an alert box when I click the facebook like button. I have tried some scripts but it doesn't work.

Here is the Button Code.

    <div class="fb-like" 
   data-href="https://www.facebook.com/uefachampionsleague/?fref=ts
   data-layout="standard" 
   data-action="like"
   data-show-faces="true" 
   data-share="false">
   </div>

And I have tried doing with

    <div>
    <script type="text/javascript">

        window.fbAsyncInit = function () {
            FB.init({
                status: true, 
                cookie: true, 
                xfbml: true  
            });

            FB.Event.subscribe('edge.create', function (response) {
            alert('You liked');
            });
        };
    </script>
 </div>

PS: I am using Visual Studio 2010 (just in case).

Related posts

Recent Viewed