How to install the backend#

This guide shows you how to add plonegovbr.socialmedia to a Plone project, and install it in a site.

Prerequisites#

  • A Plone 6.1 or 6.2 project.

  • Python 3.11 or later.

  • A Volto frontend, to edit and show the settings.

Add the package#

Add plonegovbr.socialmedia to the dependencies of your project's backend package.

dependencies = [
    "Products.CMFPlone",
    "plonegovbr.socialmedia",
]

Then install it as your project normally does.

make backend-install

The package declares a plone.autoinclude.plugin entry point, so Plone loads its ZCML without an <include />.

Install it in your site#

Declare the profile as a dependency of your own package's profile, in profiles/default/metadata.xml.

<?xml version="1.0" encoding="utf-8"?>
<metadata>
  <version>1000</version>
  <dependencies>
    <dependency>profile-plonegovbr.socialmedia:default</dependency>
  </dependencies>
</metadata>

Installing your package now installs this one with it, on every site you create.

If your project has no package of its own, install Social Media support for Plone: Install from Site Setup ‣ Add-ons instead.

Either way, the profile enables the settings behavior on the site root, and hides Plone's own Social Media control panel. See GenericSetup profiles for everything it applies.

Important

Installing does not copy the values of Plone's Social Media control panel. On a site that had them, set them again on the site root, as How to set the site's links shows.

Verify the installation#

Ask the site for the schema of its root.

GET /Plone/@types/Plone%20Site HTTP/1.1
Accept: application/json

The response lists a social_media fieldset holding share_social_data, facebook_app_id, and social_links.

Next steps#