Facebook Connect:FB Like Button
- Home
- Documentation
- Modules
- Facebook Connect
- Tags
- FB Like Button
You can integrate the Facebook Like button on your site. The Like button lets a user share your content with friends on Facebook. When the user clicks the Like button on your site, a story appears in the user's friends' News Feed with a link back to your website. Users do NOT have to have synced accounts to "like" your site using the Facebook Like button. They just need to be logged into Facebook.
{exp:fbc:like}

Parameters
The following parameters are available for use:
href=
href="{url_title_path='site/comments'}"
This parameter allows you to set the URL of the entry being commented on. For example: http://www.yoursite.com, {site_url}, {url_title_path='site/comments'} or http://www.site.com/{segment_2}/{segment_3}/, etc.
send=
send="true"
This parameter allows you to specify whether to include a Send button with the Like button.
layout=
layout="standard"
This parameter allows you to specify which predetermined Facebook layout you'd like. Options are:
- standard - displays social text to the right of the button and friends' profile photos below. Minimum width: 225 pixels. Default width: 450 pixels. Height: 35 pixels (without photos) or 80 pixels (with photos).
- button_count - displays the total number of likes to the right of the button. Minimum width: 90 pixels. Default width: 90 pixels. Height: 20 pixels.
- box_count - displays the total number of likes above the button. Minimum width: 55 pixels. Default width: 55 pixels. Height: 65 pixels.
width=
width="450"
This parameter allows you to set the width (in pixels) of the Comment Box.
show_faces=
show_faces="true"
This parameter allows you to specify whether to display profile photos below the button (standard layout only).
action=
action="like"
This parameter lets you choose the verb to display on the button with predetermined Facebook options. Options are like or recommend.
colorscheme=
colorscheme="dark"
This parameter allows you to control the color scheme of the Like button with predetermined Facebook options. Options are light or dark.
font=
font="arial"
This parameter allows you set the font to display in the button with predetermined Facebook options. Options are arial, lucida_grande, segoe_ui, tahoma, trebuchet_ms or verdana.
Examples
Below is some example code on how to display the Facebook Like button on your site:
{exp:fbc:like
href="{url_title_path='site/comments'}"
send="true"
layout="standard"
width="450"
show_faces="true"
action="like"
colorscheme="light"
font="arial"
}
Below is how you would add the Facebook Like button in your page so that users can “like” entries on your site:
{exp:channel:entries require_entry="yes"}
<h2>{title}</h4>
<p>{body}</p>
{exp:fbc:like
href="{url_title_path='site/comments'}"
send="true"
layout="standard"
width="450"
show_faces="true"
action="like"
colorscheme="light"
font="arial"
}
{/exp:channel:entries}


