Skip to content

Instantly share code, notes, and snippets.

@arush
Created August 15, 2011 16:39
Show Gist options
  • Save arush/1147150 to your computer and use it in GitHub Desktop.
Save arush/1147150 to your computer and use it in GitHub Desktop.
FB like webook / event subscribe
window.fbAsyncInit = function () {
FB.init({
appId: 'APPID',
Status: true,
Cookie: true,
Xfbml: true
});
FB.Event.subscribe('edge.create', function (response) {
Alert("Hello World! URL Liked!");
});
};
(Function() {
Var e = document.createElement('sc​ript');
e.async = true;
e.src = document.location.protocol​ + '//connect.facebook.net/en​_US/all.js';
document.getElementById('f​b-root').appendChild(e);
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment