且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

打开图表元标记

更新时间:2023-12-05 21:10:40

你需要放在您的页面中打开元标记,如

 < meta property =og:titlecontent =The Rock/> 
< meta property =og:typecontent =movie/>
< meta property =og:urlcontent =http://www.imdb.com/title/tt0117500//>
< meta property =og:imagecontent =http://ia.media-imdb.com/rock.jpg/>
< meta property =og:site_namecontent =IMDb/>
< meta property =fb:adminscontent =USER_ID/>
< meta property =og:description
content =一组美国海军陆战队员,由
a叛逃将军指挥,接管恶魔岛和
威胁旧金山湾生物
武器。/>

示例在这里找到 http://developers.facebook.com/docs/opengraphprotocol/



您还需要更改***标签到

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

然后它应该可以正常工作:)



要调试页面,看看您是否正确实现了打开标记,请使用调试工具: http:// developers.facebook.com/tools/debug/



希望有帮助


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 it's don't work .

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