Page 1 of 1

Facebook Data-width feed - can it be responsive?

Posted: Wed Mar 30, 2016 3:38 am
by simonmlewis
We keep coming across a problem where we have to customize our pages around the Facebook feed.

So rather than just letting it be 100% wide, so it stretches to the width of it's DIV, you have to give it a fixed width.

Surely there is a better way of adding feeds with this tool, so that it is the width of the div (so great on a small and big phone alike).

Code: Select all

<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_GB/sdk.js#xfbml=1&version=v2.4&appId=idhere";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


<div class="fb-like-box" data-href="https://www.facebook.com/pagename" data-width="298" data-height="398" data-adapt-container-width="true" data-colorscheme="light" data-show-faces="false" data-header="false" data-stream="true" data-show-border="false"></div>
</div>