Since there are problems with Facebook after you updated to the latest Facebook SDK, and we’ve had to stop asking publishing permissions in facebook.login(), we’ve moved most functionality over to using facebook.showDialog() instead. However, I’m unable to find a way to use the dialog to post an image to the user’s wall.
According to Facebooks documentation, it is definately possible (and recommended) to use the dialog for this: https://developers.facebook.com/docs/reference/dialogs/feed/
How can we snap a picture of the game with display.save and use that in the dialog post? This is not working, nor does it work to use attachment + table instead of picture:
[code]
local function listener(event)
if (“session” == event.type) then
if event.phase ~= “login” then return false end
local obj = {
method = ‘feed’,
redirect_uri = ‘http://coronalabs.com’,
link = ‘http://coronalabs.com’,
picture = system.pathForFile(“img.jpg”, system.TemporaryDirectory),
name = ‘I struggle with this’,
caption = ‘’,
description = ‘Only getting a Facebook SDK error with this code.’
}
facebook.showDialog(“feed”, obj)
end
end
display.save(group, “img.jpg”, system.TemporaryDirectory)
facebook.login(appId, listener)
[/code] [import]uid: 21746 topic_id: 35709 reply_id: 335709[/import]