You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何为Facebook嵌入信息流添加圆角(border-radius)?

Embedding a Facebook Page on Your Website

To successfully embed a Facebook Page on your website, you’ll need two core components: the HTML container that renders the page, and the Facebook SDK JavaScript to enable the embed functionality. Here’s a complete breakdown:

HTML Embed Container

This is the code block that defines how your Facebook Page will appear. Be sure to replace BLANK with your actual Facebook Page URL, and adjust the data-* attributes to match your desired layout:

<div class="fb-page" 
     data-href="https://www.facebook.com/BLANK/" 
     data-tabs="timeline" 
     data-width="500" 
     data-height="300" 
     data-small-header="false" 
     data-adapt-container-width="true" 
     data-hide-cover="true" 
     data-show-facepile="true">
  <blockquote cite="https://www.facebook.com/BLANK/" class="fb-xfbml-parse-ignore">
    <a href="https://www.facebook.com/BLANK/">BLANK</a>
  </blockquote>
</div>

Required Facebook SDK JavaScript

Your original JS snippet was truncated, so here’s the full, official script you need to include (place this right before the closing </body> tag for optimal performance):

<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v18.0" nonce="YOUR_NONCE_VALUE"></script>

Quick Customization Tips:

  • Replace BLANK in the HTML with your actual Facebook Page URL (update it in all three places).
  • Swap en_US in the SDK script with your preferred locale if you need the embed to display in a different language.
  • The nonce attribute is optional but recommended if you’re using a Content Security Policy (CSP) for your site.
  • Tweak data-* attributes to adjust the embed: change data-tabs to events or messages to show different page sections, or modify data-width/data-height to resize the embed.

内容的提问来源于stack exchange,提问作者SnowboardBruin

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 07:49:53