Open graph meta tags

前端 未结 1 1083
没有蜡笔的小新
没有蜡笔的小新 2021-01-19 06:58

I use Facebook application (shortstack) to make my page. I want to Personalize publication when I share it with short URL. I have test to create a open graph meta tags but i

相关标签:
1条回答
  • 2021-01-19 07:35

    You need to put opengraph meta tags in your page like

    <meta property="og:title" content="The Rock"/>
    <meta property="og:type" content="movie"/>
    <meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
    <meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
    <meta property="og:site_name" content="IMDb"/>
    <meta property="fb:admins" content="USER_ID"/>
    <meta property="og:description"
          content="A group of U.S. Marines, under command of
                   a renegade general, take over Alcatraz and
                   threaten San Francisco Bay with biological
                   weapons."/>
    

    example found it here http://developers.facebook.com/docs/opengraphprotocol/

    You also need to change the top tag to

    <html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:og="http://ogp.me/ns#"
      xmlns:fb="http://www.facebook.com/2008/fbml">
    

    And then it should work fine :)

    To debug your page and see if you correctly implemented opengraph tags use the debugger tool here: http://developers.facebook.com/tools/debug/

    Hope that helps

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