facebook open graph meta property og:type of 'website'. The property 'object-name' requires an object of og:type 'object-name'

Posted by chinmayahd on Stack Overflow See other posts from Stack Overflow or by chinmayahd
Published on 2012-04-13T04:42:36Z Indexed on 2012/04/16 5:29 UTC
Read the original article Hit count: 262

in cake php 1.3 in view ctp i have follow code:

$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)); ?>

and it gives the following error when i am posting it'

{
   "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
   }
}

is any one know how to solve it?

© Stack Overflow or respective owner

Related posts about php

Related posts about facebook