I want to add a Facebook Like box similiar to what Mark Suster has done on his blog. It's a like box with the number of fans and a few pictures. The blog I'm putting it into is custom build.
-
Here are the official instructions: developers.facebook.com/docs/reference/plugins/like Edit: it's a Like Box without the stream. Here are the instructions: developers.facebook.com/docs/reference/plugins/like-box And the wiki: wiki.developers.facebook.com/index.php/Like_Box– AlexCommented Jul 31, 2010 at 18:22
-
Thanks. It appears that you must also get the Unique id. You can get it back being logged into facebook and graph.facebook.com/<ID>. If you need additional help view these instructions developers.facebook.com/docs/api.– citadelgradCommented Jul 31, 2010 at 18:32
-
I realize this is an old answer, Alex, but would you mind putting a summary of what's contained at the links so the answer can stand alone?– jonscaCommented Apr 25, 2018 at 1:38
-
@jonsca Just added with updated content.– AlexCommented Apr 30, 2018 at 12:59
Add a comment
|
1 Answer
The Like Box is deprecated now. You should use the Page Plugin now, which
lets you easily embed and promote any public Facebook Page on your website. Just like on Facebook, your visitors can like and share the Page without leaving your site.
To do this,
- Go to Page Plugin and configure your page.
- Click on Get Code
Include the JavaScript SDK on your page once, ideally right after the opening body tag.
<div id="fb-root"></div> <script>(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 = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.12'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
Place this code wherever you want the plugin to appear on your page.
<div class="fb-page"></div>
-
Thanks! I should have waited a bit longer before converting the other to a comment.– jonscaCommented Apr 30, 2018 at 22:06