Hire a web Developer and Designer to upgrade and boost your online presence with cutting edge Technologies

Friday, October 14, 2022

Dynamic Facebook Share button for Website Webpages

 

This is basic HTML version. You can use the same method in all type of programming languages.
Share.html

<html>
 <head>
  <script>
   function myFunction() {
   var x = document.URL;
   document.getElementById("honey").src = 'https://www.facebook.com/plugins/share_button.php?href='+x+'&layout=button_count&size=large&mobile_iframe=true&width=83&height=28&appId';
  }
  </script>
</head>
 <body onload="myFunction()">
 <iframe id="honey" src="" width="83" height="28" style="border:none;overflow:hidden" scrolling="no"  frameborder="0" allowTransparency="true"></iframe>
 </body>
</html>

No comments:

Post a Comment