Please help me to fix this JavaScript

I am using this script to show twitter share button. It works but the problem is it doesn’t return the amount of shares the URL has.

Please what is wrong.

<script type="text/javascript">
    
    function renderTwShare() {
        var parent = document.getElementById('twshare');
        var child = document.getElementById('twshareimg');
        parent.removeChild(child);    
        
    !function(d,s,id){
   var js,
       fjs=d.getElementsByTagName(s)[0],
       p=/^http:/.test(d.location)?'http':'https';
if(!d.getElementById(id)){
   js=d.createElement(s);
   js.id=id;js.src=p+'://platform.twitter.com/widgets.js';
   fjs.parentNode.insertBefore(js,fjs);
 }
}
   (document,'script','twitter-wjs');
 }
</script>

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.