facebook.showDialog() behavior

I am struggling with how the parameters for facebook.showDialog() mean.

If i wanted to create a post on the users timeline, and fill the post message with something sent from my app, isn’t the format :

#######################################################

 facebook.showDialog( “feed”, {

                                message = bestMessage,

                        })

#######################################################

But In another post on the forums a user posted that this works and not the first way

#######################################################

 facebook.showDialog( “feed”, {

                                message = “”,

                                name = bestMessage,

                        })

#######################################################

However, neither of these works for me. I am able to login into facebook, and it starts a new post saying it’ll be sent from my app. But instead of populating the field of the message box it leaves it blank. 

Any ideas?

Ps. I appologize for the #'s sorrounding sections of code… it seems if i put appropriate  tags for the code [.code] and [./code] (without the dots) around my block eliminates everything past it

I don’t think either of those are actually right.  Refer to this page which details what the parameters are for the feed dialog: https://developers.facebook.com/docs/reference/dialogs/feed/.

FYI, the right tags to use are [.lua] and [./lua] (without the dots).

  • Andrew

Ah, so the documentation on this was out of date?

Thank you.

That depends – what documentation were you looking at?

  • Andrew

The one provided by corona : http://docs.coronalabs.com/api/library/facebook/showDialog.html

specifically 

#############################################

local facebook = require “facebook”

– listener for “fbconnect” events
local function listener( event )
if ( “session” == event.type ) then
– upon successful login, request list of friends
if ( “login” == event.phase ) then
facebook.showDialog( “apprequests”, {
message = “You should download this game!”
})
end
elseif ( “dialog” == event.type ) then
print( event.response )
end
end

– first argument is the app id that you get from Facebook
facebook.login( “1234567890”, listener )

#############################################

PS. sorry your lua tags messed with the format 

That example is for the “apprequests” dialog, which takes different parameters than the “feed” dialog.

It may not be easy to see right away, but that page does point to the Facebook documentation (under Syntax, ‘action’, there’s a link that says “See this page for more information”, linking to https://developers.facebook.com/docs/dialogs/).

  • Andrew

Ah, alright that makes sense. So I should be looking here specifically: https://developers.facebook.com/docs/reference/dialogs/feed/

So I think I am either looking at name, caption, or description when it comes to my values I am looking for.

Name, since my first post included an example of it, doesn’t work. So I should try either caption or description next? Am I getting warmer?

You might want to experiment with the different parameters to see what works best in your case.  But for me, I use the following parameters: to, caption, description, and link.

  • Andrew

Thank you for your suggestions

I don’t think either of those are actually right.  Refer to this page which details what the parameters are for the feed dialog: https://developers.facebook.com/docs/reference/dialogs/feed/.

FYI, the right tags to use are [.lua] and [./lua] (without the dots).

  • Andrew

Ah, so the documentation on this was out of date?

Thank you.

That depends – what documentation were you looking at?

  • Andrew

The one provided by corona : http://docs.coronalabs.com/api/library/facebook/showDialog.html

specifically 

#############################################

local facebook = require “facebook”

– listener for “fbconnect” events
local function listener( event )
if ( “session” == event.type ) then
– upon successful login, request list of friends
if ( “login” == event.phase ) then
facebook.showDialog( “apprequests”, {
message = “You should download this game!”
})
end
elseif ( “dialog” == event.type ) then
print( event.response )
end
end

– first argument is the app id that you get from Facebook
facebook.login( “1234567890”, listener )

#############################################

PS. sorry your lua tags messed with the format 

That example is for the “apprequests” dialog, which takes different parameters than the “feed” dialog.

It may not be easy to see right away, but that page does point to the Facebook documentation (under Syntax, ‘action’, there’s a link that says “See this page for more information”, linking to https://developers.facebook.com/docs/dialogs/).

  • Andrew

Ah, alright that makes sense. So I should be looking here specifically: https://developers.facebook.com/docs/reference/dialogs/feed/

So I think I am either looking at name, caption, or description when it comes to my values I am looking for.

Name, since my first post included an example of it, doesn’t work. So I should try either caption or description next? Am I getting warmer?

You might want to experiment with the different parameters to see what works best in your case.  But for me, I use the following parameters: to, caption, description, and link.

  • Andrew

Thank you for your suggestions