Agregar el botón “Me gusta” de Facebook en cualquier página web es bastante sencillo. El botón contiene una serie de parámetros configurables que podemos cambiar desde el mismo código del iframe o directamente en el generador del botón en facebook en http://developers.facebook.com/docs/reference/plugins/like.
Parámetros del botón “Me gusta”:
href : Es la dirección a compartir. (ej: http://www.bufa.es/)
layout : Estilo del botón. Valores: standard o button_count
show_faces : Muestra el avatar de a quiénes le gusta. Valores: true o false.
width : Ancho del iframe.
action : Texto del botón. Valores like o recommend. (Me gusta o Recomendar)
font : Tipo de fuente a utilizar.
colorscheme Esquema de colores. Valores: light o dark.
locale : Idioma
Ejemplo 1 (standard):
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.bufa.es&layout=standard&show_faces=true&width=450&action=like&font=trebuchet+ms&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>
Ejemplo 2 (button_count):
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.bufa.es&layout=button_count&show_faces=true&width=450&action=like&font=trebuchet+ms&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>
Ejemplo 3 (box_count):
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.bufa.es&layout=box_count&show_faces=true&width=450&action=like&font=trebuchet+ms&colorscheme=light&height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:65px;" allowTransparency="true"></iframe>
—
Para cambiar el idioma del botón “Me gusta” de facebook podemos añadirle la variable “locate” al like.php. Por ejemplo, si queremos que aparezca siempre en Español (‘es_ES’):
<iframe src="http://www.facebook.com/plugins/like.php?locale=es_ES&href=http%3A%2F%2Fwww.bufa.es&layout=standard&show_faces=true&width=450&action=like&font=trebuchet+ms&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>
6 Comentarios
Jorge, el 26/12/2010 a las 05:07:17
Muchas gracias, me sirvio mucho. Este tema “Me gusta”
zuzo, el 29/03/2011 a las 05:17:39
Me marca un error al dar “Me gusta”
Dónde puedo solucionar esto, me dice que necesita página de referencia
carlos, el 23/07/2011 a las 04:07:42
Hola, por casualidad sabes como puedo hacer que aparezca el boton me gusta con el Flash CS5?
estoy haciendo un pagina en flash sin tener idea de usar el programa, asi que se me ha hecho indispensable los tutoriales,
Muchas gracias de antemano
Slds
Zherg, el 17/08/2011 a las 00:19:24
Muchas gracias por la explicación. Aprovecho para preguntar si suele notarse de forma clara algun aumento de visitas por el hecho de tener el botón. Un saludo!!
maria josé, el 11/10/2011 a las 12:14:18
¿por qué me sale en inglés??
Gerson, el 07/11/2011 a las 03:21:44
Hola.. me gustaría saber por qué al ingresar este código, en mi pág aparecen menos ME GUSTA de las que realmente tengo en la pag de face….?
Saludos y gracias por su ayuda