Open graph meta tags

不想你离开。 提交于 2019-12-04 03:54:00

问题


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 .


回答1:


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



来源:https://stackoverflow.com/questions/10172183/open-graph-meta-tags

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!