title: How to publish an action to facebook using cURL
body: <p>Hello I have the following code in an attempt to publish an action on facebook.</p>
  
  <p>(The action is to favourite a photo.)</p>
  
  <p>I have set in the facebook dev a namespace for my app... xxxxxx-com</p>
  
  <p>I have used the facebook debugger to check the url of the object and all is ok.</p>
  
  <p>The object has an og:type: xxxxxx-com:photo</p>
  
  <pre><code>$url = 'https://graph.facebook.com/'.$userFacebookId.'/xxxxxx-com:favourite';     
  $ch = curl_init();   
  $attachment = array('access_token' =&gt; $accessToken,
  'photo' =&gt; $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); 
  </code></pre>
  
  <p>Everyhting seems to be fine, however I get the following error:... </p>
  
  <blockquote>
    <p>{"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"}}</p>
  </blockquote>
  
  <p>PLease help... kind regards to any responders... J</p>