Reputation: 762
I have created a custom action(my_custom_action) and object(mycustom_object) on the opengraph section of facebook. When I use the code that is provided by the facebook code, shown below it works ok. It updates on my timeline with the custom actions
$response = $facebook->api(
'me/mycustom_object:my_custom_action'
'POST',
array(
'mycustom_object' => "http://samples.ogp.me/randomstring"
)
);
However when I replace the string 'mycustom_object' => "http://samples.ogp.me/randomstring" with the link to the post I get an error
Object at URL http://www.samplewebsite.me/ has og:type of 'website'. The property 'mycustom_object' requires an object of og:type 'mynamespace:mycustom_object'
Upvotes: 0
Views: 153
Reputation: 11
If you are developer or admin of your facebook app, you can publish actions with your facebook account even if your action it's not approved
On the page of your custom object you have to use facebook's meta tags, for example if you check one of Bufys.com gifts:
<meta property="og:site_name" content="Bufys.com">
<meta content="337269566361040" property="fb:app_id">
<meta content="bufys_com:gift" property="og:type">
<meta content="http://bufys.com/products/516c2da59fafe800020393c5" property="og:url">
<meta content="Chocolates Trufa Happy B-day 170 grs" property="og:title">
<meta content="Chocolates Trufa Happy B-day 170 grs" property="bufys_com:gift">
<meta content="Una fiesta en una caja! Abre esta caja de regalo para encontrar una sorpresa de colores surtidos de nuestras 15 trufas favoritas. Decorada con dichos caprichosos, una rebanada de pastel, un gorrito de fiesta y velitas. Esta caja te desea “Feliz Cumpleaños!” (18 piezas aprox.)" property="og:description">
<meta content="//s3.amazonaws.com/bufys-prod/products/516c2da59fafe800020393c5_7c33925e2154ece04d4ceb33589fa48c_n.jpg" property="og:image">
Upvotes: 1