Facebook open graph meta tags maximum content length

后端 未结 3 356
北海茫月
北海茫月 2021-02-02 07:00

Does anyone know the maximum valid length for each of Facebook\'s open graph meta tags?

The description of the meta tags on http://ogp.me/ does not list maximum length

相关标签:
3条回答
  • 2021-02-02 07:19

    There isn't a hard limit on the data you can put there, but in various rendering places Facebook will limit it. The limit in news feed is different from the limit in Ticker which is different than the limit on timeline.

    Just put the correct content in there and we'll truncate it when rendering.

    0 讨论(0)
  • 2021-02-02 07:34

    Here's a good link regarding this topic: http://www.joshspeters.com/how-to-optimize-the-ogdescription-tag-for-search-and-social

    Regarding Facebook it says:

    "Right now Facebook only displays the first 300 characters of a description so if your primary audience is on Facebook write your OG:Description tag accordingly."

    0 讨论(0)
  • 2021-02-02 07:39

    In my testing:

    og:title 40 chars

    og:description has 2 max lengths:
    When the link is used in a Post, it's 300 chars. When a link is used in a Comment, it's 110 chars.

    So you can either treat it as 110, or, write your Descriptions to 300 but make sure the first 110 is the critical part and still makes sense when it gets cut off.

    0 讨论(0)
提交回复
热议问题