facebook.showDialog() + image = false

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]

Nah, looks like this is a Facebook limitation in the regular feed dialog. However, with the native share dialog it’s possible. We have implemented that, so at least a few of the users will be able to attach photos. [import]uid: 21746 topic_id: 35709 reply_id: 142002[/import]

Nah, looks like this is a Facebook limitation in the regular feed dialog. However, with the native share dialog it’s possible. We have implemented that, so at least a few of the users will be able to attach photos. [import]uid: 21746 topic_id: 35709 reply_id: 142002[/import]

Can you show how you got this to work?

Thanks!

Can you show how you got this to work?

Thanks!

Can you share how you did it with the share dialog please? I’m struggling with that as well.

Can you share how you did it with the share dialog please? I’m struggling with that as well.