Class fsw.like
Like module. Handles the like button and related events.
Defined in: fsw.0.2.0.js.
Constructor Attributes | Constructor Name and Description |
---|---|
fsw.like()
|
Method Attributes | Method Name and Description |
---|---|
<static> |
fsw.like.createBtn(containerId, target, options)
Create a FB "like" button
Inserts a like button in the specified DOM element.
|
<static> |
fsw.like.likeBtn#bind(onLike, onUnlike)
Bind to "like" buttons' like/unlike events
|
Method Detail
<static>
fsw.like.createBtn(containerId, target, options)
Create a FB "like" button
Inserts a like button in the specified DOM element.
Containing element must have in ID.
- Parameters:
- {String} containerId
- ID of the DOM element in which to insert the Like button
- {String} target
- URL to Like
- options Optional
- Additional information passed to the like button
- {String} options.action
- Default: like - Alts: recommend
- {String} options.colorscheme
- Default: light - Alts: dark
- {Boolean} options.faces
- Default: false - Show fans' profile pics
- {String} options.font
- Default: arial - Alts: lucida grande | segoe ui | tahoma | trebuchet ms | verdana
- {String} options.layout
- Default: standard - Alts: button_count | box_count
- {String} options.ref
- a label for tracking referrals
- {Boolean} options.send
- Default: false - Include a "send" button?
- {Number} options.width
- Default: 420 - Width, in pixels, of plugin
<static>
fsw.like.likeBtn#bind(onLike, onUnlike)
Bind to "like" buttons' like/unlike events
var myButton = fsw.like.createBtn(containerId,target); myButton.bind(onLike, onUnlike);
- Parameters:
- {Function} onLike
- callback when user "likes" using FB like button
- {Function} onUnlike
- callback when user "unlikes" using FB like button