1

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.

peter.o
  • 3,460
  • 7
  • 51
  • 77
  • 1
    I know this is not an answer to your question but can you consider using meta tags instead of manually setting the title/description? There are lots of advantages by doing this, for example it is easier to manage what's displayed, a small change doesn't need to change many modules posting messages and if someone copy/paste your link in Facebook the title/description/image will be automatically displayed. – glautrou Jul 29 '13 at 11:56
  • I know but it's a client's wish :) – peter.o Jul 29 '13 at 12:12

2 Answers2

3

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.

Lix
  • 47,311
  • 12
  • 103
  • 131
  • 1
    Yes, I've found it in the documentation today. But I believe it has changed recently. I followed this post http://stackoverflow.com/questions/2943297/how-send-message-facebook-friend-through-graph-api-using-accessstoken#9328262 when creating my Send Dialog. `Properties` where copied from documentation. – peter.o Jul 29 '13 at 12:04
  • @pet - that post was from over a year ago. The relevant documentation was updated about a month ago. It is very possible that the feature has changed since... – Lix Jul 29 '13 at 12:05
  • 1
    As a Facebook developer, you really have to keep watch and follow the [developers roadmap](https://developers.facebook.com/roadmap) to keep upto date on any changes... – Lix Jul 29 '13 at 12:07
  • It also stopped working for me. Looks like Facebook suddenly stopped supporting them. – Tony Paternite Oct 25 '13 at 23:02
0

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

Amit
  • 15,217
  • 8
  • 46
  • 68
  • 1
    How is this different from what the OP posted? – Lix Jul 29 '13 at 12:04
  • I am using same but display is not there – Amit Jul 29 '13 at 12:05
  • You just use default display. I need `popup` for my site. – peter.o Jul 29 '13 at 12:06
  • @aka - you should really add some explanations. Just throwing some code into an answer is not the best way to help someone.. Take another 2 mins and explain what you changed and what your reasons are. – Lix Jul 29 '13 at 12:06
  • Yes, you're right. But custom description is not working. Using older API, default value was `page`. – peter.o Jul 29 '13 at 12:14