Personalized Facebook Share Dialog - unique title and description

I need to send a link using the FB Send Dialog with custom name and description.

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

Despite setting a custom name and description, the Send Dialog is not displaying it and instead using the title and "meta" description from the link. It was working fine when I first used it 3 weeks ago and I haven't made any changes since then.

Any help is greatly appreciated. Thank you.

Answer №1

The reason why the dialog is not recognizing those fields is because it lacks support for them. It is possible that any previous functionality was due to inaccuracies in Facebook's documentation, which is a common occurrence.

It seems like you may be getting confused between the Send and Feed dialogs. The Send dialog does not include "name" and "description" parameters, only to and link. This information can be found in the documentation.

On the other hand, the Feed dialog allows you to input the fields you mentioned.

If you still want to achieve the same functionality, you can use the Feed dialog and specify a to parameter.

Answer №2

Give this a shot

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

Facebook Developer Guide

display

Determines the way the dialog appears.

  • If utilizing the URL redirect dialog setup, it will display as a full page within Facebook.com. This display mode is known as page.
  • If using our iOS or Android SDKs to call the dialog, the appropriate display mode for the device is automatically selected.
  • When using the JavaScript SDK, the default display will be a modal iframe for users logged into your app, or async when in a game on Facebook.com, and a popup window for others. Custom display types such as popup or page can also be enforced with the JavaScript SDK if needed.
  • Mobile web apps will default to the touch display mode.

Learn more

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Stop auto-scrolling to the top when triggering a getJSON request

I'm feeling really puzzled at the moment. Here is the snippet of code I am struggling with: $("#combinations").on("change", "input", function (e) { e.preventDefault(); console.log(e) var $button, $row, $group, $form, $barcode ...

Employing HTML5/CSS3 for classic image animation through traditional Sprite animation techniques

Currently, I am exploring the use of a sprite sheet for animation purposes. Rather than using canvas, I have opted for the HTML5/CSS3 method of displaying images on the screen. However, I have encountered a potential obstacle at the start of this process. ...

No tests were found to run when Karma was executed using the ng test command

I'm facing an issue with my Angular 10 project where Karma is not detecting my default and custom spec.ts files for execution. Any ideas on why this could be happening? Here is a snapshot of my unchanged Karma Config file: // Karma configuration file ...

Issue with Trix text editor not triggering the change event

Lately, I've been facing some difficulties in getting the tirx-change event to trigger when there are changes in the content of a trix-editor. Despite using React JS for the view, I haven't been able to identify the problem. Below is the code sni ...

What is the best way to generate a fresh JSON object within a react hook function?

I am currently facing two issues. Firstly, I am having trouble figuring out how to add/update the JSON items within a hook. Secondly, React seems to be restricting me from using the name that is stored in a previous JSON file. I am open to exploring alter ...

Stop an item from being included based on a boolean value

I need to iterate through an array of IDs called "world". The idea is that if the ID value in world exists in myArray[n].id, then I want to remove the entire element from myArray. If it doesn't exist, then I want to add it to myArray. world = ["124241 ...

Obtaining the id in JavaScript from PHP to display information

This is the code I've written: <textarea id="summernote<?php echo $u->id ?>" name="isi" placeholder="Write here" style="width: 100%; height: 100px !important; font-size: 14px; line-height: 18px; border: ...

Is there a way to display the true colors of a picture thumbnail when we click on it?

In my project, I attempted to create a dynamic color change effect when clicking on one of four different pictures. The images are displayed as thumbnails, and upon clicking on a thumbnail, it becomes active with the corresponding logo color, similar to t ...

Pausing briefly after selecting an element with Webdriver

I have been attempting to highlight an element on a webpage for a specific duration of time, approximately 5-6 seconds. However, I am facing difficulty in making the highlight persist for the desired duration as it currently flashes briefly. Despite using ...

What is the correct way to fetch JSON data from a remote server using pure JavaScript?

I'm receiving JSON data from a remote server at openweathermap.org. Can anyone help me identify issues with my code? Here is an example of the server's response here var getWeatherJSON = function (city) { var httpRequest = window.XMLHttpRequ ...

The requested Javascript function could not be found

I have the following JavaScript function that creates a button element with a click event attached to it. function Button(id, url, blockMsg){ var id = id; var url = url; var blockMsg = blockMsg; var message; this.getId = function(){ return id; }; th ...

Leap over in a similar fashion to the provided demonstration

In my attempt to create a unique project, I have created this CodePen example. The goal is to have one ball on the circle that remains in a fixed position, while another rotating main ball must avoid touching it at all costs. Points are awarded for success ...

JavaScript and PHP/HTML template engine technology

I've recently discovered the jQuery template engine and am intrigued by its potential. It seems to be very efficient for ajax calls, as the data exchange is minimized. However, when I initially load my application using only PHP and HTML to display ...

Connecting the value of one input to influence another input

There are two input boxes provided - one for current address and another for permanent address. When the checkbox is clicked, the value of the current address should be displayed in the permanent address box. However, I am facing an issue where when I unc ...

Is it possible to include all visible content, even when scrolling, within the full page height?

My webpage contains content that exceeds the height of the window. I am looking for a way to retrieve the full height of my page using either jQuery or pure Javascript. Can anyone provide a solution? I have considered the following approach: $('body ...

Looking for assistance in correctly identifying types in react-leaflet for TypeScript?

Embarking on my 'first' project involving react-scripts-ts and react-leaflet. I am attempting to create a class that should be fairly straightforward: import {map, TileLayer, Popup, Marker } from 'react-leaflet'; class LeafletMap exte ...

Mastering React children: A guide to correctly defining TypeScript types

I'm having trouble defining the children prop in TypeScript for a small React Component where the child is a function. class ClickOutside extends React.PureComponent<Props, {}> { render() { const { children } = this.props; return chi ...

A guide to implementing the map function on Objects in Stencil

Passing data to a stencil component in index.html <app-root data="{<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b5d4d7d6f5d2d8d4dcd99bd6dad8">[email protected]</a>, <a href="/cdn-cgi/l/email-pro ...

Display loading spinner and lock the page while a request is being processed via AJAX

Currently, I am working on a project using MVC in C#, along with Bootstrap and FontAwesome. The main objective of my project is to display a spinner and disable the page while waiting for an ajax request. Up until now, I have been able to achieve this go ...

problem with the clientHeight attribute in window event handlers

The component below is designed to react to changes in window resize based on the container height. However, there seems to be an issue where the containerHeight variable increases as the window size decreases, but does not decrease when I make the window ...