jQuery Facebook Widget plugin

I was developing a web site which required the addition of some Facebook buttons. So I said to myself: "What about a jQuery plugin that makes this job for you?". And here's the plugin called Facebook Widget.

Version 1.0

This first version supports both the Like and Sharer widgets, but I think that in a not too distant future many other widgets will be added.

Syntax

$(element).FacebookWidget(options);

Options

url
The URL of the resource to share. Defaults to the current page URL.
klass
A CSS class name to add additional styles. Defaults to fb-widget.
wrapper
An additional HTML container to get more control over styling. Defaults to fb-widget-wrapper.
type
The type of widget to be displayed. Defaults to sharer.
text
The text content of a Facebook link. Defaults to Facebook.

Demo

jquery-facebook-widget.html

Download

jquery.facebook.widget.js

Version 1.5

Added support to the Activity button. New options include:

header
The header of the Activity button. Defaults to false (no header).
colorscheme
Default scheme color of the button. Defaults to light.
reccomendations
Displays Facebook's recommendations. Defaults to false.
transparency
Allows the button's background to shine through other elements. Defaults to false.

Demo

jquery-facebook-widget-15.html

Download

jquery.facebook.widget.15.js

Leave a Reply

Note: Only a member of this blog may post a comment.