title: Upload a photo to facebook album
body: <p>I have a nodejs (+express + mongodb,gridstore) backend, and want to upload a photo to a facebook album.</p>
  
  <p>I came across 2 methods. the first ( <a href="https://developers.facebook.com/blog/post/526/" rel="nofollow">https://developers.facebook.com/blog/post/526/</a> ) needs to get the full url resource of my picture, which I don't have as it is data that I pull from gridstore,
  and the second ( <a href="https://developers.facebook.com/docs/reference/api/album/" rel="nofollow">https://developers.facebook.com/docs/reference/api/album/</a> ) is very poorly documented, via the Graph API, where I can't figure out what my request should look like. (the form-data, what fields should it have, how to convert my data blob\stream from gridstore to it)</p>
  
  <p>Here is what I currently have, and doesn't work:</p>
  
  <pre><code>facebook.uploadPhoto = function (token, albumId, photo, callback) {
      var fb = fermata.json('https://graph.facebook.com/' + albumId);
      fb.photos({access_token:token}).post({'Content-Type':"multipart/form-data"}, {source:{data:photo}}, callback);
  };
  </code></pre>
  
  <p>Any help would be much appreciated </p>