在视图 ctp 中的 cake php 1.3 中,我有以下代码:
$url = 'http://example.com/exmp/explus/books/view/'.$book['Book']['id'];
echo $this->Html->meta(array('property' => 'fb:app_id', 'content' => '*******'),'',array('inline'=>false));
echo $this->Html->meta(array('property' => 'og:type', 'content' => 'book'),'',array('inline'=>false));
echo $this->Html->meta(array('property' => 'og:url', 'content' => $url ),'',array('inline'=>false));
echo $this->Html->meta(array('property' => 'og:title', 'content' => $book['Book']['title']),'',array('inline'=>false));
echo $this->Html->meta(array('property' => 'og:description', 'content' => $book['Book']['title']),'',array('inline'=>false));
$imgurl = '../image/'.$book['Book']['id'];
echo $this->Html->meta(array('property' => 'og:image', 'content' => $imgurl ),'',array('inline'=>false)); ?>
当我发布它时它会给出以下错误'
{
"error": {
"message": "(#3502) Object at URL http://example.com/exmp/explus/books/view/234' has og:type of 'website'. The property 'book' requires an object of og:type 'book'. ",
"type": "OAuthException",
"code": 3502
}
}
有人知道如何解决吗?