Update FB:Like URL Dynamically using JavaScript-Collection of common programming errors
For reinit social buttons i use this code:
//Facebook like
if(typeof(FB) !== 'undefined')
FB.XFBML.parse(document.getElementById('fblike'));
//Google plus one
if(typeof(gapi) !== 'undefined') {
gapi.plusone.render(document.getElementById('gplus'),{
'href':location.href,
'annotation':'bubble',
'width': 90,
'align': 'left',
'size': 'medium'
});
}
//Twitter tweet button
if(typeof(twttr) !== 'undefined') {
$('.twitter-share-button').attr('data-url',location.href);
twttr.widgets.load();
}
With html code like this:
Tweet