Skip to content

A small library to make it easier to create Facebook Like buttons and track clicks on them

Notifications You must be signed in to change notification settings

jonyt/Facebook-LikeButton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Facebook-LikeButton

A small library to make it easier to create Facebook Like buttons and track clicks on them. This library is released under the MIT license. Check out the demo.

var likeCallback = function(response){ // Callback will be invoked when user presses 'Like'
    console.log(response)
};
// Parameters are: URL to like, settings, callback, appId, channel file URL
var fbl = LikeButton.create('http://www.facebook.com', {}, likeCallback, YOUR_APP_ID, PATH_TO_CHANNEL_FILE);           
document.getElementsByTagName('body')[0].appendChild(fbl);

OR

// Parameters are: URL to like, settings, callback, appId, channel file URL
var fbl = LikeButton.create('http://www.facebook.com');         
document.getElementsByTagName('body')[0].appendChild(fbl);

Note: available settings are hasFaces (boolean), hasSendButton (boolean), layout (one of standard, button_count, box_count), verb (like or recommend) and width (number).

About

A small library to make it easier to create Facebook Like buttons and track clicks on them

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published