Post image to Facebook with custom text

Hi! 

I’m posting a screenshot to my facebook wall with this code: 

[lua]–Facebook post
local function facebookPost()

local screenCap = display.captureScreen(false)
display.save( screenCap, “image.jpg”, system.TemporaryDirectory )
screenCap:removeSelf()

local function onLoginSuccess()
print(“login success!”);

local attachment = {
message = “This is an image!”,
source = { baseDir=system.TemporaryDirectory, filename=“image.jpg”, type=“image” }
}
facebook.request( “me/photos”, “POST”, attachment )
native.showAlert( “Success!”, “The picture was uploaded!”, { “Ok!” })
end

– facebook listener
local function fbListener( event )

if event.isError then
print(“THIS IS ERROR”)
native.showAlert( “ERROR”, event.response, { “OK” } )
else
if event.type == “session” and event.phase == “login” then
– login was a success; call function
onLoginSuccess()
end
end
end

– photo uploading requires the “publish_stream” permission
facebook.login( fbAppID, fbListener, { “publish_stream” } )

end[/lua]

This works really well, however, I want to be able to customize the text that is posted to the wall. I have tried to use the showDialog function:

[lua]facebook.showDialog( “feed”, {
message = “This is text!”
})[/lua]

The problem with this is that:

1: The popup box disappears in both the ios simulator and on the device.

2: When I was able to post, I couldnt attach my picture.

I hope there is an easy solution to this, I’m just so tired of failing now…

Thanks!