Facebook Open Graph and Metatags

后端 未结 3 1904
半阙折子戏
半阙折子戏 2020-12-18 16:21

I have the following output at https://developers.facebook.com/tools/debug

I added the locale metatag, because I had a lot of Extraneous Propert

相关标签:
3条回答
  • 2020-12-18 16:37

    Facebook's documentation is out of date, (big surprise there.) The only allowed og:types can be found here, none of which are company.

    0 讨论(0)
  • 2020-12-18 16:53

    This is because even though you have specified og:type=company, the linter is showing that your type is website, and the properties you are trying to use are not applicable for a website object type. There is an accepted answer for this here. Your real problem is that the linter is reading og:type incorrectly.

    0 讨论(0)
  • 2020-12-18 16:56

    You should also remember to add namespace declaration to the head and body tags of your page.

    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xmlns:fb="https://www.facebook.com/2008/fbml"> 
       <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns# YOUR_NAMESPACE: http://ogp.me/ns/apps/YOUR_NAMESPACE#"> 
         <meta property="fb:app_id" content="YOUR_APP_ID" /> 
         <meta ...
    

    Obviously, replace YOUR_NAMESPACE and YOUR_APP_ID with your app's settings.

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