You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

求助:Facebook无法识别OG标签,网页分享预览异常

Hey there! Let's walk through the most common reasons Facebook might not be recognizing your OpenGraph tags, along with how to check each one:

Common Issues & Troubleshooting Steps for Facebook OG Tag Recognition
  • Malformed or incorrect OG tag syntax
    First, double-check that your tags follow the standard format: <meta property="og:[tag-name]" content="[your-content]">. Easy mistakes include swapping property for name, misspelling tag names (like og:tile instead of og:title), or leaving critical tags (like og:title, og:type, og:image, og:url) with empty content values. Ensure all core OG tags are present in your page's <head> section.

  • Facebook crawler can't access your page
    Facebook uses its facebookexternalhit/1.1 crawler to fetch page content for previews. If your site has firewall restrictions, CDN blocks, or a robots.txt file that disallows this crawler, it won't be able to read your OG tags. Verify your robots.txt doesn't have rules blocking Facebook's crawler, and test if your page is publicly accessible (try opening it in an incognito window, for example).

  • Cached outdated data
    Facebook caches OG tag data aggressively—even if you've fixed the issue, it might still be pulling from an old cache. Use Facebook's official sharing debugger tool to force a refresh: input your URL, and the tool will re-scrape your page and update its cached data.

  • Problems with the og:image tag
    This is one of the most frequent culprits:

    • Incorrect dimensions: Facebook recommends images of 1200x630 pixels (minimum 600x315 pixels). Smaller images might be ignored or displayed poorly.
    • Unreachable image: Ensure the image URL is publicly accessible—no login required, no hotlink protection blocking Facebook's crawler.
    • Unsupported format: Stick to JPG, PNG, or GIF; WebP might not be supported by older versions of the crawler.
  • Dynamic content rendering issues
    If your page uses client-side JavaScript frameworks (like React or Vue) to render content dynamically, Facebook's crawler won't execute that JS by default. That means it'll only see the raw, unrendered HTML, which might lack proper OG tags. Fix this by using server-side rendering (SSR) or pre-rendering to generate static HTML with fully populated OG tags for crawlers.

  • Duplicate or misplaced tags
    Make sure you don't have duplicate OG tags (e.g., two og:title entries) floating around, and that all OG tags are directly placed within the <head> section of your page. Tags nested inside other elements (like <div>s) won't be picked up correctly.


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

火山引擎 最新活动