I have written a detailed documentation on how to use the library and its methods associated with different social media services. To give you an idea on how easy it is to use – here is an example of using Google+ Share function.
Initialize the Google+ class and create a new instance.
var gplus = new Socialmedia.GooglePlus();
Let’s bind the
Google+ Share action to a button’s click event.
link parameter takes in any link you like to share and
lang parameter sets the Google+ interface language. If you do not provide any parameters then default value for
link would be current page URL and for
lang it would be
en (English). Since this action is now bound with button click event, this will trigger a Google+ Share dialog with relevant data. That’s all it takes to setup the Google+ Share function.
An example of Google+ Share dialog on action call
You can also try a live demo of this library by using social media sharing links at end of this page.