Sunday, January 6, 2013

How to display reccomendations via Facebook

One of the easiest ways to get users to visit another page on your site is to recommend pages they will like. One of the easiest ways is to display a Recommendations box with Facebook. But, to add like buttons to other hosts is easy.
To add the recommendations box to your site, navigate to developers.facebook.com/docs/reference/plugins/recommendations/ and fill in the  box. You can customize it easily. Put the Facebook Javascript SDK in your <head> tags;
<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 = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Then paste the box code into the place where you want it to appear: 

<div class="fb-recommendations" data-site="http://sethsdiscoveries.blogspot.com" data-width="300" data-height="300" data-header="false" data-font="trebuchet ms"></div>

No comments:

Post a Comment

Feel free to comment. Keep it nice, polite and on topic. You may link to a site if it contains content relates to the content of whatever post you are commenting on. You may link to a site that only uses, for example, HTML5 video. Remember, on topic!