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.

The solution in this guide includes Code Injection and adding advanced code to the Code Block. These are Premium features available in the current Website Business plan and higher:

  • Disponible en: Todos los planes Business y Commerce
  • Disponible en: Plan personal heredado (ya no está disponible para suscripciones nuevas)
  • No disponible en: El plan Personal Actual
  • Trial: You can use Code Injection during a trial.

Para conocer más, visita funciones Premium.

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.

Note: Embedded code is sometimes disabled while you're logged in as a security measure. If you're not seeing your code, log out or view the page using your browser's Private / Incognito mode. For more information, visit Why can't I see custom code while logged into my site? 

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.

In the Advanced tab, paste the Facebook Like button code (from Step 3) in the Post Blog Item Code Injection box. 

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

Haz clic en Guardar.


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 55
Adding a Facebook Like button