peter.o
peter.o

Reputation: 3530

Facebook Send Dialog - custom name, description

I'm trying set a custom description and name when sending link using FB Send Dialog.

FB.ui({
method: 'send',
name: 'Custom name',
display: 'popup',
link: 'http://link.com',
to: facebookUserId,
description: 'Custom desc.'
}

However, Send Dialog ignores custom name and description and uses title and "meta" description from link. When I first used Send Dialog (3 weeks ago) custom text and description were shown. I haven't made any changes since then.

Thanks a lot in advance.

Upvotes: 1

Views: 6242

Answers (2)

Amit
Amit

Reputation: 15387

Try this

FB.ui({
    method: 'send',
    name: 'Custom name',
    link: 'http://link.com',
    to: facebookUserId,
    description: 'Custom desc.'
});

Facebook Developer Reference

display

Determines how the dialog is rendered.

  • If you are using the URL redirect dialog implementation, then this will be a full page display, shown within Facebook.com. This display type is called page.
  • If you are using one of our iOS or Android SDKs to invoke the dialog, this is automatically specified and chooses an appropriate display type for the device.
  • If you are using the JavaScript SDK, this will default to a modal iframe type for people logged into your app or async when using within a game on Facebook.com, and a popup window for everyone else. You can also force the popup or page types when using the JavaScript SDK, if necessary.
  • Mobile web apps will always default to the touch display type.

Reference

Upvotes: 0

Lix
Lix

Reputation: 47956

The dialog is ignoring those fields because it does not support them. If it did work previously, you can attribute it to Facebook's documentation being inexact (that happens quite a lot).

I believe you are confusing the Send and Feed dialogs. There are no "name" and "description" parameters for the Send dialog. Only to and link. This is mentioned in the documentation.

Whereas on the Feed dialog, you are able to supply all the fields you mention.

You can still use the Feed dialog and specify a to parameter to get the same functionality.

Upvotes: 3

Related Questions