AS3 Facebook canvas app - need to send image to friend feed (wall) - can this be done?

I have a Facebook canvas application written in AS3 and using the Adobe Facebook API.

I can connect, get a list of friends, choose a friend, everything that works, works great. The problem is that I'm trying to send a message to a friend's wall. I am trying to post an image. What is it, just an image.

A 200x200 image that complies with facebook guidelines of at least 50x50 and is outside the 3: 1 ratio.

I searched all interwebz for an answer and tried all the examples that I can find. I combined what looked like promising attempts, just to prevent the image from appearing yet. Other information, such as a message, link, etc., appears if I include it. There is simply no picture. Here is the code that looked the most promising based on what they say on facebook.

Facebook.api('/' + friendID +'/feed', onPicPosted, {image:imageToPost, message:messageToPost, fileName:'FILE_NAME'}, URLRequestMethod.POST); 

friendID is the selected friend, imageToPost is a bitmap, onPicPosted is a callback that returns successful, although the image does not show.

I also tried a slight change based on someone's guess, changing the image to the image in the params object.

 Facebook.api('/' + friendID +'/feed', onPicPosted, {picture:imageToPost, message:messageToPost, fileName:'FILE_NAME'}, URLRequestMethod.POST); 

rights were requested and granted ("publish_stream", as well as "user_photos" and "friends_photos" for a safe measure only).

This problem delays delivery, so urgently I understand that. If someone has an idea on how to send an image (a bitmap created in the flash) to a friend’s selected wall, please help! Thanks!

0
source share
1 answer

After several studies:

It's impossible. an image is not an expected property, rather an image , and the image expects the URL to not be a bitmap.

The solution was to first upload the image to the server via php, and then send the image with the returned URL.

In addition, as a note, an image posted on a friend’s wall through the application can be no more than 90x90. It can be larger than if it was sent to the user's own wall, but not to the walls of the user's friends.

0
source

All Articles