Adding Facebook sharing/liking buttons to Drupal 7 content

Drupal 7 Facebook Sharing Widget Module Decision Workflow:

  1. Do you just want Facebook or do you want every social media service under the sun (Twitter, Pinterest, Reddit, Google+, LinkedIn, etc.). There are a number of smaller services which are like Facebook for a niche. Some countries have their own, especially China. Other major social networks like YouTube or Instagram aren't places to share general blog content.
  2. Do you want to add a Like button or a Share button? People tend to Like things more than they Share. Likes across Facebook are aggregated/added together even when the link to your content is shared by somebody else on their own timeline. You can have both a Like and a Share button too.
  3. Customizing the look of your Facebook Like/Share buttons: do you want the default Facebook buttons or your own style?

Once you've decided what social media you want, what buttons you want, and how specific you want the style, now you can consider some of the many possible Drupal modules.

Facebook Like Button - does its job well. But does only 1 job, which is to insert a Like button into node content. It does give you the standard Facebook like button.

Facebook Share - It ought to be the same as the Like button but is implemented differently and uses its own button images instead of getting images/style directly from Facebook. Instead, the style is its own, meant to look like the standard Share button but now appears out-dated. You could hack it to use current Facebook share buttons. It just won't match up with the Like button from the above module.

Service Links - This module helps you deal with tons of social media services you've never heard of or nobody is using anymore. There are also hosted widgets like AddThis which offer many social media services but they add their own branding. Only helpful if you need a uniform way to enable sharing across a lot of different social networks.

Ridiculously Responsive Social Share Buttons - This isn't just for Drupal. Like Service Links, it also gives you options for multiple social networks (but fewer). The buttons look nice - the buttons use the site colors and then show a small icon and the name of the service, with the name disappearing on smaller screens. The buttons are also responsive.

Ridiculously Responsive Social Share Buttons for Drupal

There's a service called AddThis which offers a widget (including a Drupal module to do it for you) and it looks similar to RRSSB. It does other things, and inserts itself into any click, which is why I don't recommend it. AddThis also charges money for paid versions.

Drupal for Facebook - for building Facebook apps that integrate with Facebook, not for adding Facebook widgets to your Drupal site.

The above applies for Drupal 7 only. Drupal 8 just came out so most modules haven't been updated for it, and many won't ever be, including a lot of social media ones. I expect the needs of social media integration will be quite different in another 1-2 years thus this way of adding share widgets could be obsolete.

Adding Facebook sharing/liking buttons to Drupal 7 content | TECH.SAIGONIST.COM

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /home/tomo/web/tech.saigonist.com/drupal7/php/includes/common.inc:2776) in drupal_send_headers() (line 1486 of /home/tomo/web/tech.saigonist.com/drupal7/php/includes/bootstrap.inc).
  • Error: Class 'CToolsCssCache' not found in _cache_get_object() (line 32 of /home/tomo/web/tech.saigonist.com/drupal7/php/includes/cache.inc).
The website encountered an unexpected error. Please try again later.