title: Facebook Graph API - upload photo using JavaScript with base64 image URL
body: <p>The following code snippet is used to upload photo using facebook Javascript SDK. Can I use the imgURL to be base64 image URL string which is generated from Canvas? Something like "data:image/png;base64,iVBORw0KGgoAAAANSUh..."</p>
  
  <pre><code>var imgURL="http://farm4.staticflickr.com/3332/3451193407_b7f047f4b4_o.jpg";//change with your external photo url
  FB.api('/album_id/photos', 'post', {
      message:'photo description',
      url:imgURL        
  }, function(response){
  
      if (!response || response.error) {
          alert('Error occured');
      } else {
          alert('Post ID: ' + response.id);
      }
  
  });
  </code></pre>