Nota: Si bien hemos traducido las guías más populares al español, algunas guías están disponibles solamente en inglés.
Adding a Facebook Like button

There are two ways to add a Facebook Like button to your site: You can display the Like button with your other Share buttons, or you can use this guide to add a custom Like button to pages and blog posts using the Code Block.

We recommend using our built-in Share button, but a code-based solution might be a good option if you have coding knowledge and want more control over where the button appears.

Note: The Facebook Like button won't post directly to the visitor's Facebook timeline, but may appear in their friends' News Feeds, depending on their feed and Facebook's algorithms.
Los pasos de esta guía incluyen usar la Inserción de código y agregar código avanzado al Bloque de código. Estas son funciones Premium disponibles en los planes Business y Commerce.

Antes de comenzar

Facebook's custom Like button code isn't compatible with our built-in Facebook Share button. To avoid having an empty space in your Share button list, disable the Facebook Share button by following these steps:

  1. En el Menú de Inicio, haz clic en Marketing y, luego, en los Botones Compartir.
  2. Uncheck Facebook before adding this code.

To learn more, visit Adding share buttons.

Step 1 - Create a Like button

To add a Facebook Like button to your site, you'll need to create the button using Facebook's developer tools. You can find those here.

In the URL to Like box, enter your Site URL or the URL of the page on your site you'd like the button to apply to.

In the Width box, enter the width you'd like your plugin to be in pixels. This will depend on the space of the area where you'd like your button to appear. Facebook automatically sets the height of the plugin.

Select a style from the Layout drop-down menu.

Then, select an Action Type from the Action Type drop-down menu.

Check Show Friends' Faces to display profile thumbnails when two or more friends like this post. Check Include Share Button to display a Share Button with the Like Button.

Click Get Code.

Step 2 - Add the Javascript SDK code

Copy the Javascript SDK code from the first box.

Open your Squarespace site in a new tab. In the Home Menu, click Settings, click Advanced, and then click Code Injection.

In Header box, paste the Javascript SDK code. Click Save.

Note: For more help with this panel, visit Using Code Injection.

Step 3 - Add the Like button code to a page

In Facebook's developer tools, copy the Like button code from the second box.

This code is used to add a Like button to a specific area of your site. You can add this to any content area using the Code Block.

Open the editor for the page or post where you'd like to add the Like button. Click an Insert Point and select Code from the Block Menu.

In the Code Editor, paste the Like button code. Click Save.

Nota: El código para insertar a veces está deshabilitado mientras está activa tu sesión como una medida de seguridad. Si no ves tu código, cierra la sesión o ve la página desde el modo Privado/Incógnito de tu navegador. Si necesitas más información, consulta ¿Por qué no veo el código personalizado cuando he iniciado sesión en mi sitio?

Step 4 - Add post-specific Like buttons to blog posts (optional)

You can modify the code to display a unique Like button below each of your blog posts. When visitors click this Like button, it will like the specific blog post, rather than your site as a whole.

En el panel de Páginas , posiciona el cursor sobre el título de una Página de Blog y haz clic en el ícono gear-icon junto al título para abrir la Configuración de Página.

En la pestaña Avanzada, pega el código del botón Me Gusta de Facebook (del Paso 3) en el recuadro de Inserción de código del elemento de publicación de blog.

Replace your site URL in the code with {permalink}.

Haz clic en Guardar.

fb-like.png

The Facebook Like button will display directly after the content for each blog post.

Note: This third-party customization falls outside the scope of our support. This means that we’re unable to help further with setup or troubleshooting. Additionally, since this is a code-based solution, we can’t guarantee its functionality or full compatibility with Squarespace. This includes how it functions with our responsive design, particularly its appearance on mobile devices, and if it functions on all templates. Third-party customizations can also cause display issues with future updates to our platform. While we can't help further, there are many resources that can point you in the right direction:

To add a "Like on Facebook" option to your site without custom code, try Share buttons.

¿Fue útil este artículo?
Usuarios a los que les pareció útil: 41 de 56
Adding a Facebook Like button