1

Possible Duplicate:
Facebook new javascript sdk- uploading photos with it!

I've had great success with the JS Graph API, and this is my first hang up.

This code does NOT work to save a photo, but it does save an album.

    function saveImage() {
        FB.api("/me/albums", "post", {
            message:"album message",
            name: "name of album"
        }, function(response) {
            console.log(response.id) // id of album, yes?
            FB.api("/99999999/photos", 'post', {
                message:"hji",
                source: "@http://url/to/image/markz.png"
            }, function(response) {
                console.log(response)
            });
        });

It does create an album, but saving an image gives me the error: message: "(#324) Requires upload file"

I've tried it without the @ in front of the source. I've tried many variations including providing the auth token in the sending object. I have successfully saved an image via a curl in the terminal.

  1. I have permission to update_stream
  2. I'm authenticated
  3. I have thoroughly search the internet and read a plethora of PHP blogs how they do it in PHP.
Community
  • 1
  • 1

1 Answers1

0

I just provided an similar answer to a duplicate question: Facebook new javascript sdk- uploading photos with it!

Hope this helps.
CameraSchoolDropout

Community
  • 1
  • 1