HomeArticles

Introducing socialmedia.js v1.1

Those who often work with Facebook API are aware that how tedious it could be to go find the appropriate code script(s)for Facebook SDK to make various Facebook API functions available into their applications. So was the case with me when I started working with Facebook applications about half a year ago.

You have to find and set up the appropriate JavaScript code into HTML of your each file in which you wish to use Facebook API as well as setup the channel file for cross-domain access and the special div tag to let SDK initialise them. It is quite a bit of work if you have to do it regularly or for each file — unless you ease the process a little by using some sort of MVC structured application or personalised templates.

Socialmedia.js

Let me introduce you with socialmedia.js — a small JavaScript library that includes all required functionality for Facebook API SDKs and ready to go by adding few straightforward script line(s) into your application’s HTML. This library is surely a result of above mentioned bizarre recursion. socialmedia.js also works fine for all kind of Facebook built-in plugins such as Like button, Comments Box and Follow Button etc. and built-in functions such as Share, Invite etc.

Along with Facebook social actions, it also makes available the function to tweet. Although, I made it for my own ease with only a required limited functionality and had been successfully using it for over 6 months, I now intend to add more SDKs setup i.e. Twitter API and Google Plus API to make it more diverse.

The project is open-source with MIT license. Current stable version 1.1 has detailed guidelines, examples and is available to download from GitHub.

Your comments and feedbacks are always welcome and help in improvement.

More articles