I want to change the Facebook embedded posts plugin to fit in the side bar widget for my site. Currently, it is 286px wide, but the Facebook plugin width is around 567px.
How can I accomplish that?
Web Applications Stack Exchange is a question and answer site for power users of web applications. It only takes a minute to sign up.
Sign up to join this communityIf you are using the Facebook Embedded Posts Plugin released at the beginning of August (2013), you cannot currently change the appearance or width of the post. According to the documentation (linked to above):
Can I customize how the post is displayed on my web page?
Currently, you cannot customize how Embedded Posts are displayed on your page. The size of the post is fixed to the same dimensions as it's shown on Facebook.
My unexpert two-cents: Theoretically, you could apply your own CSS to the
<div class="fb-post"></div>
, but it seems like (as of right now) this will just end up cutting off part of the post or messing up the aspect ratio (or something to that effect).
css:
.fb-post iframe {
transform:scale(0.5,0.5);}
however then it will be quite tinsy. Beyond the iframe you lose css control.
You will able to solve it by using DIV element:
<div id="PostOnPage" class="fb-post" data-href="<%= lblLinkURL.Text %>"
data-width="350" style="pointer-events: none; ">
but the smaller width that facebook accept is range between 350px - 750px.