Users can share content from your Drupal site on Facebook, Twitter, and many other websites and services. There are several approaches.

  1. Add sharing code directly to your site — Most of the major social networks with an API will offer snippets of Javascript and/or HTML for displaying a share link. If you have a very small number of pages where you want the sharing feature enabled, you may be able to paste this code directly in the body content or other text area field, if the tags are permitted by your text format filter. Another option is to embed this code in your theme, perhaps in a custom template file. Yet another option would be to add it to a custom module that inserts it in the appropriate output.
  2. Use a service-specific module — If you prefer not to write your own code, but the service buttons you want to allow are relatively fixed and few in number, you can use contributed modules.
  3. Use a multiple social-sharing service — To enable a large number of sharing options, investigate services such as AddThis or ShareThis. You may be able to use a code snippet provided by the service, as you would for option #1, or use a Drupal module that integrates with the service, as in option #2. The benefit of using such a service is that it offloads from the developer the need to track changes among the various services, and to add or remove them as they come in and out of fashion. The downsides are adding dependency on an outside service and being limited to the versions and options for sharing provided through the social sharing service, which may be more limited than going directly to the social network.

See also