Last active
December 23, 2015 15:09
-
-
Save rogelio/6653592 to your computer and use it in GitHub Desktop.
Responsive Facebook like box, no stream, show faces.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script> | |
| </head> | |
| <body> | |
| <div id="container"><!-- your fb like container, leave it blank or paste the code here. --></div> | |
| <div id="fb-root"></div> | |
| <script> | |
| /* | |
| * REMEMBER TO CHANGE TO YOUR APP ID AND CHANGE data-href TO SUIT YOU | |
| */ | |
| (function(d, s, id) { | |
| var js, fjs = d.getElementsByTagName(s)[0]; | |
| if (d.getElementById(id)) return; | |
| js = d.createElement(s); js.id = id; | |
| js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1"; | |
| fjs.parentNode.insertBefore(js, fjs); | |
| }(document, 'script', 'facebook-jssdk')); | |
| $(window).bind("load resize", function(){ | |
| var container_width = $('#container').width(); | |
| $('#container').html('<div class="fb-like-box" ' + | |
| 'data-href="https://www.facebook.com/adobegocreate"' + | |
| ' data-width="' + container_width + '" data-show-faces="true" ' + | |
| 'data-stream="false" data-header="true"></div>'); | |
| FB.XFBML.parse( ); | |
| }); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment