in Kuchen PHP 1.3 im Hinblick auf CtP ich habe Folgecode:facebook öffnen graph meta property og: art der "website". Die Eigenschaft 'object-name' erfordert ein Objekt der og: type 'object-name'
$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)); ?>
und es gibt die folgende Fehlermeldung, wenn ich bin Entsendung es '
{
"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
}
}
ist jemand wissen, wie man es löst?
Dies ist kein Problem mit Cake, glaube ich, da der Fehler von der Facebook-API kommt? Wie sieht die Quelle http://example.com/exmp/explus/books/view/234 aus? 'og: type' könnte zweimal definiert werden, was zu Problemen beim Posten führen würde. – mensch
Ich denke, in Cake ist der Standard og: type als 'website' definiert, während du versuchst, ihn zu überschreiben, um dort einen 'book'-Typ zu haben. – balint