Hello I have the following code in an attempt to publish an action on facebook.
(The action is to favourite a photo.)
I have set in the facebook dev a namespace for my app... xxxxxx-com
I have used the facebook debugger to check the url of the object and all is ok.
The object has an og:type: xxxxxx-com:photo
$url = 'https://graph.facebook.com/'.$userFacebookId.'/xxxxxx-com:favourite';
$ch = curl_init();
$attachment = array('access_token' => $accessToken,
'photo' => $urlOfObject,
);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $attachment);
$result= curl_exec($ch);
curl_close ($ch);
Everyhting seems to be fine, however I get the following error:...
{"error":{"message":"(#3502) Object at URL urlOfObject has og:type of 'xxxxx-com:photo'. The property 'photo' requires an object of og:type ''.","type":"OAuthException"}}
PLease help... kind regards to any responders... J