我使用Facebook应用程序(shortstack)制作我的页面。当我使用短URL共享出版物时,我希望对出版物进行个性化设置。我有测试,以创建一个开放的图形元标签,但它不工作。
发布于 2012-04-17 01:06:22
你需要把opengraph的meta标签放在你的页面上,就像这样
<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."/>示例在这里找到了http://developers.facebook.com/docs/opengraphprotocol/
您还需要将top标记更改为
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml">然后它应该工作得很好:)
要调试页面并查看是否正确实现了opengraph标记,请在此处使用调试器工具:http://developers.facebook.com/tools/debug/
希望这能有所帮助
https://stackoverflow.com/questions/10172183
复制相似问题