title: how to share photo from facebook app
body: <p>I want so share photos to my Facebook timeline from my application. I created a quiz application which gives a certificate.  I want to show an image of that certificate as a photo on Facebook. I checked the Facebook php SDK, but couldnt figure out how to do that. Is there any specific code to do this? I saw some Facebook apps that are sharing images directly to my wall.</p>
  
  <p>Heres some code i tried and failed:</p>
  
  <pre><code>require 'lib/facebook.php';
  $facebook = new Facebook(array(
    'appId'  =&gt; 'xxxx',
    'secret' =&gt; 'xxxxxx',
  ));
  $photo = "";
  $message = "Checkout my photo";
  $ret_obj = $facebook-&gt;api('/me/photos', 'POST', array(
                                           'source' =&gt; '@' . $photo,
                                           'message' =&gt; $message,
                                           )
                                        );
  echo '&lt;pre&gt;Photo ID: ' . $ret_obj['id'] . '&lt;/pre&gt;';
  </code></pre>