Reputation: 800
I am trying to customize the number of feeds and auto scroll functionality in Facebook likebox using below code.
<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_IN/sdk.js#xfbml=1&appId=453991991316939&version=v2.0";fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'facebook-jssdk'));</script>
I have tried multiple canvas resize methods given in multiple websites but now getting stuck. Any ideas? how can I customize this or it will be great if someone have already created plugin for this?
Upvotes: 5
Views: 1064
Reputation: 29
You need to copy the given below CSS code with Facebook Like Box code and paste it in your page.
You need to changee the url in iframe *************** to your facebook url.
<style type="text/css">
.f-bookMain {
background-color:#E1E1E1;
width:320px;
border:1px solid #BCBCBC;
padding:15px 0 15px 15px;
height:280px;
}
.f-bookInnerBlock {
overflow:hidden;
height:280px;
border:1px solid #aaa;
}
</style>
<div class="f-bookMain">
<div class="f-bookInnerBlock">
<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2F***************&
width=300&height=258&colorscheme=light&show_faces=true&header=false&stream=false&
show_border=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:258px;"
allowTransparency="true">
</iframe>
</div>
</div>
<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>
You need to changee the url in iframe *************** to your facebook url.
Upvotes: 1