I have had this feature implemented in a number of my games. The code is pretty straightforward:
[lua]
local attachment =
{
message = “Your image is now on your Facebook page!”,
source = { baseDir=system.ResourceDirectory, filename=“image.jpg”, type=“image” },
}
facebook.request( “me/photos”, “POST”, attachment )
[/lua]
This seems to have broken in the last few days, I’m thinking maybe Facebook changed something? I get a response of “Error: HTTP status code: 400”, facebook error code 5. This is from the app I’m working on and an old one that I know this worked on fine as recently as a week ago.
I am using the “publish_stream” parameter when logging in.
If I run the Facebook Sample app, with this code replacing the ‘post photo’ section, and making sure there is an image with the correct name in the Resource Directory, it fails.