Hi All,
I need to take a screenshot and then post this screen shot to facebook. I am successfully able to take screen shot and I am also successfully posting simple text messages to Facebook. Now I want to take a screenshot from within the App and then post this screenshot to facebook. I need some help onthis. I am trying to do it this way
local function postPhoto\_onRelease( event ) local screenCap = display.captureScreen( false ) fbCommand = POST\_PHOTO facebook.login( appId, listener, {"publish\_stream"} ) end
And then in the listener I am doing this way
if fbCommand == POST\_PHOTO then local attachment = { name = "Some name", link = "http://www.somelink.com", caption = "Link caption", description = "Some caption", picture = screenCap, actions = json.encode( { { name = "Learn More", link = "http://coronalabs.com" } } ) } facebook.request( "me/feed", "POST", attachment ) end
Please guide me where I am wrong as I am not able to post the screenshot although post is made on facebook but screenshot is missing.
Thanks in advance