打开图表元标记 [英] Open graph meta tags

查看:146
本文介绍了打开图表元标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Facebook应用程序(shortstack)来制作我的页面。
当我与短网址分享时,我想个性化发布。
我有测试来创建一个打开的图表元标记,但它不起作用。

解决方案

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

 < 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

这篇关于打开图表元标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆