Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

What are social media widgets? Oooh, give me.

Parent Feed: 

The web has gone crazy for social media widgets. What's not to love? Magic little boxes that connect our sites to the social power of the web in convenient little code snippets. They are all the rage with the hip, in-the-know online pundits.

If you are not familiar with the social widgets, let me take a step back. (If you are familiar, feel free to skip to the free prize at the bottom of the blog.) We all know what social media is. It is about the world's masses connecting and engaging with each other online in ways never before possible. The social media revolution is driven by platforms we all have heard of: Twitter, Facebook, LinkedIn, Google+, StumbleUpon, Del.icio.us, and Pinterest. Okay, maybe you haven't heard of a few of them, but if not, you will. They are kind of a big deal.

It used to be that there were two sides of the web: the social side and your website. Well, yours and all the traditional websites we all have built over the last couple decades. The biggest problem was the social side is where all the cool kids hang out. But now it's not just the cool kids, it's everybody. Everyone from your mother and brother to your preacher and teacher are connecting, publishing, engaging and influencing on social media.

If you are an organization, pay particular attention to the influencing part. Wonder why your advertising is not working? You no longer control the conversation. The masses do – and they are doing it in the online social space.

So how can we integrate the two worlds of websites with social platforms? Social media widgets have emerged as the de facto, deceptively simple, yet powerful answer. They are little pieces of copy and paste code you can place on your site to connect you with social media platforms.

What are they

A widget can be as simple as a pretty button that links to your Twitter profile or Facebook page. They can be counter boxes that allow site visitors to tweet, like, share and bookmark your content on sites like StumbleUpon and Del.icio.us. They can even be more advanced like showing live Twitter updates from a profile or search term or showing a picture pile of your fans on Facebook complete with a like button that enables them to become your fan directly from your site.

Looking around the LevelTen Insight blog you see several examples. To the left we have our sharing counter widgets in a cool little floating box. (Go ahead and share. Sharing is fun.) At the top right below the search box, our profile links. (Check them out. I'll wait a minute.) On the right hand sidebar, buttons for subscribing to our blog feeds via Feed burner. (Feel free to subscribe.) Below that, a Facebook widget connecting to our fan page (Like, go ahead and join the party). At the bottom of the page is an aggregate of our tweets. (sage wisdom in 140 characters or less)

To be accurate, not all of these are technically widgets. For example, Tweets aggregation is done through a relatively sophisticated piece of programming encapsulated in Drupal's Twitter module. And that is sort of the point. Several of these features were built before widgets like the Twitter profile widget existed. To get aggregation to work, we needed an advanced system that integrates with the social platforms APIs. Yes, Drupal has many fine modules that do this, but that just obfuscates the hard work that goes into them and the future work needed to keep pace with all the social platform changes and new extended features.

The Drupal community rocks, but it is just a small subset of the online developer community. Widgets are ubiquitous, developed by a wide range of coders independent of a site's technology.

The challenge with widgets is they are almost too easy to use. Well-connected websites use a lot of them. Since they are developed by a range of developers, there are no real standards. Widgets have also gotten more advanced offering varying degrees of personalization. Implementing more than just a trivial number of widgets, particularly customizable ones, on a site can be tedious and challenging to keep organized. Since most of the sites we implement have a high degree of social connection, we spend a lot of time trying to tame the social widgets circus.

We decided it was time for a better answer. We needed to solve this problem the Drupal way.

There's now a module for that

OK, there are actually two, the Social media and Widgets modules. The Social Media module provides dozens of popular social media widgets and helps to centrally manage your site's and user's social profiles information. (E.g. so you don't have to keep entering in your Twitter username for each widget). The Widgets module provides a central UI for organizing, customizing and placing widgets on the site using blocks, node links and tokens.

Currently the Social media module supports profile management and links for Twitter, Facebook, Google+, LinkedIn, YouTube, Vimeo, Flickr and SlideShare. It supports standard and AddThis versions of content sharing widgets for an extended range of popular sites including StumbleUpon, Del.icio.us and Technoriati. We have support for a few advanced widgets such as the Facebook Like box and Twitter profile widget.

At this point we would love to get community feedback. What widgets do you commonly use and which ones would you like to see? Just comment to let us know.


Get Drupal help when you need it most! Find hundreds of great tutorials. Track, rate, comment and more. Create Account
Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web