Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 0.54 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Has anyone successfully uploaded a photo to the Facebook Graph API with Javascript?
  2. function saveImage() {
  3.         FB.api("/me/albums", "post", {
  4.             message:"album message",
  5.             name: "name of album"
  6.         }, function(response) {
  7.             console.log(response.id) // id of album, yes?
  8.             FB.api("/99999999/photos", 'post', {
  9.                 message:"hji",
  10.                 source: "@http://url/to/image/markz.png"
  11.             }, function(response) {
  12.                 console.log(response)
  13.             });
  14.         });