T
T
themir2013-12-26 19:12:43
Facebook
themir, 2013-12-26 19:12:43

How to implement posting an image on a wall via facebook-as3-api?

I know how to upload an image to an album:

public function postImage(img:BitmapData):void
{           
    var params:Object = { photo:new Bitmap(img), 
                          message:'Test Photo', 
                          fileName:'FILE_NAME',                               
                          access_token:Facebook.getAuthResponse().accessToken
                        };
    Facebook.api('me/photos', onSavedPhoto, params, 'POST');
}

It works. But now how to post this image on the wall? I suspect you need to use the 'me/feed' method, but how do you get the link to the image uploaded to the album? Or maybe there is some method to upload an image directly to the wall?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2013-12-26
@Ualde

Facebook.api( 'me/feed', onComplete, params, "POST" );

function onComplete( response:Object, fail:Object ):void {
    trace( JSON.encode(response)  );
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question