A manager module for social integrations in Drupal.
PHP JavaScript CSS ApacheConf
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Drupal Module: Loft Social Manager

Author: Aaron Klump sourcecode@intheloftstudios.com


This module provides extra help for using social media links in Drupal

It provides a set of social buttons that can be placed in your website in several ways: on all public pages, on all node pages as part of node content or node links, or as one or more blocks placed in regions. It's up to you to decide how you'd like to use it.


This module leverages the Facebook Social module and provides a default "Like" preset. It also leverages the Metatag modules and overrides form values and metatags to increase the likelihood that you are setup correctly for Facebook. It insures that the following values in your html source on the front page match exactly.

  1. og:url
  2. shortlink
  3. canonical

Furthermore, it makes sure you use http instead of https for your social page links.


Upload an image to have the og:image and image_url metatags handled for you. Delete your image and you can modify these fields in the metatag module as expected.


  • This module works hand-in-hand with On the Web to create a tweet button from the account you've entered in On the Web.
  • If you enable Shorten URLs, twitter links will be shortened using the chosen service.
  • Use the constant LOFT_SOCIAL_TWEET_MAX_CHARS as needed.

Open Graph

Open graph tags are supported when this module leverages metatag and metatag_opengraph. See loft_social.api.php for hook(s).


  1. Install as usual, see http://drupal.org/node/70151 for further information.

  2. Visit admin/structure/fbsocial and set your Facebook application id and Base URL and submit the form.

  3. Visit admin/config/services/loft-social and review/alter/submit the settings form.

  4. Set your twitter url in the On the Web settings form.

  5. Return to the module settings page and copy the text at the bottom of the form and paste into settings.php if you wish to disable the ability for admins to change these settings (a good idea once you start getting like counts, etc.)


You can disable all loading of social plugins to speed up development by setting the following variable to 'all'.

$conf['loft_social_suspend'] = 'all'


  1. Plug your custom social things into this module using loft_social_prepare().

  2. Get the current page url for sharing links, Twitter, Facebook, etc. using loft_social_url().

  3. You program your social services using the module settings of On the Web and you can programatically obtain a service name using loft_social_get_name(). As an example, to set your Twitter name, which is used by the tweet button visit admin/config/services/on_the_web and enter your twitter url.

Design Decisions/Rationale

To encapsulate a common pattern in a module.


  • In the Loft Studios
  • Aaron Klump - Developer
  • PO Box 29294 Bellingham, WA 98228-1294
  • aim: theloft101
  • skype: intheloftstudios
  • d.o: aklump
  • http://www.InTheLoftStudios.com