Social SDKs Demo

 
With this plugin, you can easily update, after an ajax request, buttons of social plugins like "Facebook Like", "g+", "Linked in Share", "Tweet"...
You don't need any additional Javascript code from Facebook or Google, its all packed in with this plugin.
 

This is the HTML code to create a bunch of social sharing buttons (FB Like, LinkedIn Share, Twitt and Google +)

<div class="fb-like" data-href="http://promatik.pt" data-send="false" data-layout="button_count" data-width="450" data-show-faces="true"></div>

<script type="IN/Share" data-url="http://promatik.pt" data-counter="right"></script>

<a style="width:100%; height:100%" href="https://twitter.com/share" class="twitter-share-button" data-url="http://promatik.pt" data-lang="en"></a>

<div class="g-plusone" data-size="medium" data-annotation="none" href="http://promatik.pt"></div>

The result:

It worked like a charm! Because it was already in the DOM when the page loaded.
However, if you load this code after the window load, for example, by ajax, it wouldn't be so easy ...
You'd need to run renderSocialPlugins()
Take a look ...
 

renderSocialPlugins()

Here is the code you need to call after adding code to the DOM

renderSocialPlugins();

After clicking "add buttons via Javascript" nothing is going to happen, until you click to "renderSocialPlugins()"
Result:

 

socialInit()

So to conclude, here is the plugin initialization:

socialInit({
fbAppId: "346759598747625", // Your Facebook App ID
facebook: true, // true to use facebook, false if you not intend to use it
google: true,
twitter: true,
linkedin: true
});

You are able to choose witch plugins you are using to get a better performance.
Note: If you are using Facebook like, you need an App ID, you can get one at: https://developers.facebook.com/docs/reference/plugins/like/

Social SDKs Download

It's highly recommended to download the plugin from GitHub, because it's always updated there!

Here is the link to GitHub: https://github.com/promatik/Social-SDKs

Social SDKs Support

Support requests and general discussions about the Social SDKs plugin can be posted in the official forum.

If your question is not directly related to the Social SDKs plugin, you might have a better chance to get a reply by posting to Stack Overflow. Bugs and Feature requests can be reported using the issues tracker at GitHub.