Loading

fblike

  1.     <title>Your Website Title</title>
  2. </head>
  3.  
  4.   <div id="images"></div>
  5.     <!-- Load Facebook SDK for JavaScript -->
  6.     <div id="fb-root"></div>
  7.     <script>(function(d, s, id) {
  8.       var js, fjs = d.getElementsByTagName(s)[0];
  9.       if (d.getElementById(id)) return;
  10.       js = d.createElement(s); js.id = id;
  11.       js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.6";
  12.       fjs.parentNode.insertBefore(js, fjs);
  13.       }(document, 'script', 'facebook-jssdk'));
  14.  
  15.     var urls = ["https://www.flickr.com/photos/21484776@N00/12680785925/", "https://www.flickr.com/photos/lucavice/3263463735/", "https://www.flickr.com/photos/21484776@N00/12816567925/"];
  16.  
  17.     var d = document.getElementById("images");
  18.     for(var i = 0; i < urls.length; i++) {
  19.                       var el = document.createElement("div");
  20.                       el.setAttribute("class", "fb-like");
  21.                       el.setAttribute("data-href", urls[i]);
  22.                       el.setAttribute("data-layout", "standard");
  23.                       el.setAttribute("data-action", "like");
  24.                       el.setAttribute("data-show-faces", "true");
  25.                       d.appendChild(el);
  26.    }
  27.  
  28.  </script>
  29.  
  30.     <!-- Your like button code -->
  31.  
  32. </body>
  33. </html>