如何将 Codeigniter元标记助手与Facebook开放图元标记一起使用?
元标记助手想要注入名称作为 Facebook 不使用的第一个属性。有什么方法可以使用助手添加我自己的自定义方案?似乎有一些默认值'name'
,我无法摆脱使用帮助程序。
我做了什么:
$meta = array(
array('property' => 'og:type', 'content' => 'movie'),
array('property' => 'og:video:height', 'content' => '260'),
array('property' => 'og:video:width', 'content' => '420'),
array('property' => 'og:video:type', 'content' => 'application/x-shockwave-flash'),
array('property' => 'og:title', 'content' => $data['video']),
array('property' => 'og:description', 'content' => $data['video_desc']),
array('property' => 'og:image', 'content' => 'http://i2.ytimg.com/vi/'.$data['links']['extra_link_info']['original_key'].'/hqdefault.jpg'),
array('property' => 'og:video', 'content' => 'https://www.youtube.com/v/'.$data['links']['extra_link_info']['original_key'].'?version=3&autohide=1&autoplay=1')
);
我得到了什么:
<meta name="" content="movie" />
<meta name="" content="260" />
<meta name="" content="420" />
<meta name="" content="application/x-shockwave-flash" />
<meta name="" content="xxxxxxxx" />
<meta name="" content="xxxxxxxx" />
<meta name="" content="http://i2.ytimg.com/vi/xxxxxxxx/hqdefault.jpg" />
<meta name="" content="xxxxxxxx" />
我想要的是:
<meta property="og:tyoe" content="movie" />
<meta property="og:video:height" content="260" />
<meta property="og:video:width" content="420" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
<meta property="og:title" content="xxxxxxxx" />
<meta property="og:description" content="xxxxxxxx" />
<meta property="og:image" content="http://i2.ytimg.com/vi/xxxxxxxx/hqdefault.jpg" />
<meta property="og:video" content="xxxxxxxx" />