我解决了这个解决方案(使用jQuery),其他更好的想法?
function tw_reload() // reload tweet button
{
$('.social-tw').html('');
$('.social-tw').html('<a href="https://twitter.com/share" class="twitter-share-button" data-url="' + window.location.href + '">Tweet</a>');
// refresh the widgets
twttr.widgets.load();
}
Run Code Online (Sandbox Code Playgroud)