Skip to content

Instantly share code, notes, and snippets.

@evgv
Created October 3, 2017 12:19
Show Gist options
  • Save evgv/6e180cfa514884b72954713f2fde2de6 to your computer and use it in GitHub Desktop.
Save evgv/6e180cfa514884b72954713f2fde2de6 to your computer and use it in GitHub Desktop.
Js. Facebook API. Catch like/unlike events
    window.fbAsyncInit = function() {
        FB.Event.subscribe('edge.create',
            function(response) {
                alert('Liked!');
            }
        );
        FB.Event.subscribe('edge.remove',
            function(response) {
                alert('Unliked!');
            }
        );
    };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment