Include a title and description before sharing on LinkedIn using the share button

My current project involves using a basic JavaScript popup window to show a Share with LinkedIn dialog. I found a solution on this thread: How to make a custom LinkedIn share button.

https://www.linkedin.com/cws/share?url=http%3A%2F%2Fgoogle.com

I am curious if there is a way to include a title and description in the query string. I noticed that it works automatically with the Google example. Any advice would be greatly appreciated.

Answer №1

Click here to share this article on LinkedIn

Is this the script you were referring to for sharing articles on LinkedIn?

Answer №2

The LinkedIn share url only accepts the url parameter, so you can use it like this...

https://www.linkedin.com/sharing/share-offsite/?url={url}

Check out the Official Microsoft LinkedIn Share API Documentation. It clearly states that only the url parameter is supported now, not summary, title, or any other parameters.

There used to be support for additional parameters in the past before Microsoft acquired LinkedIn. Did you miss that update? If you want a GitHub project that keeps track of these changes for you, have a look at Social Share URLs

https://i.sstatic.net/8rEut.jpg

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

Emphasize the active page in the main menu

I'm struggling to use JavaScript and jQuery to highlight the current list item on my main menu. As a beginner in scripting, I am having trouble figuring out what's wrong with the code. Here is the code snippet that I have been working with. < ...

Struggling to traverse through intricate layers of nested objects in React and showcasing them without going crazy

Dealing with an API that returns data structured in deeply nested objects has been a challenging task. The goal is to extract specific data from these nested objects and then display them within a React project. Despite numerous attempts, finding a simple ...

Tips for implementing Webpack in a website and app development project

In one aspect of my project, specifically an app built with React that makes use of webpack. Now, I am looking to apply webpack to other areas of the website that do not involve React. When attempting to install webpack in the main project folder, I enco ...

Utilizing jQuery to manipulate dynamic elements on the DOM

Struggling to dynamically generate HTML using jQuery and facing challenges with adding a nested loop to generate specific target HTML code. The target HTML code is as follows: <div class="daily-featured__video-social"> <ul class="share-tools_ ...

jQuery's callback handling often reverses the statement I just made

My current project involves using AJAX with jQuery to send a get request. Once the request is successful, I insert the response into a specific div: $.get("content.php", function(result) { $('#content').html(result); The content I'm fetc ...

The characteristics of angular js Service/Factory and how they influence functionality

I'm seeking clarification on the behavior of AngularJS, especially in terms of JavaScript. In my code, I have a controller that has an Angular factory injected into it. Here's a snippet from the controller: $scope.localObjCollection = myObjFac ...

POST method now includes the conversion of line breaks from to upon entering

I created a basic test page named page1.html. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <script type="text/javascript"> function submitForm() { aler ...

Increase visibility, decrease visibility by utilizing ng-hide/ng-show and functions

As I implement the show more/show less feature, I am uncertain if achieving a smooth effect is feasible. However, I believe it's worth reaching out to this community for some creative ideas on how to make it possible. I have a list of dynamic links w ...

What is the best way to make useEffect trigger on an array's sorting?

Currently, I am working with a data object structured like this: const example = [{medicineName: "Some name", medicineId: 1}, {medicineName : "Some other name", medicineId : 2} ] const [filteredMedicineList, setFilteredMedicineList] = useState([]); ...

Showing fixed values inside directive view after successful injection

Looking for some answers about using constants in angularjs. Here are the constants defined in my app.js: ... angular .module('blocTime', ['firebase', 'ui.router']) .config(config) .constant(&apos ...

Struggling with the migration of routes from react-router v3 to v4

My route configuration using react-router v3 is as follows: <Route component={App}> <Route path="login" component={Login} /> <Route path="logout" component={Logout} /> <Route path="/" component={Admin}> <IndexRoute com ...

Ways to integrate a CSS file into XSLT

I have a CSS file that looks like this: .table_class1DeffCell { border-top-width : 1; border-left-width : 1; border-right-width : 1; border-bottom-width : 1; } .table_class11DeffCell { border-bottom-color : 000000; border-top-color : 000000; border-right- ...

Retrieve the title attribute value by utilizing the parent() function

Check out this snippet of HTML code: <a class="ms-navedit-linkNode" title="Apps" href="url/test"> <span class="menu-item-text">Apps</span> </a> I'm looking to update the title value from "Apps" to a different text. Below ...

Send data to a webpage and instantly navigate to it

When using the JavaScript code below, I am able to successfully send data to a page named "book.php" via the POST method (as indicated by the alert), but when I try to display the received data on book.php, nothing shows up. <script type="text/javascri ...

Substitute <br /> tags with a line separator within a textarea using JavaScript

Anyone have a quick fix for this? I've been searching online for a solution, but no luck so far. Already tried checking out: this, this Currently dealing with a textarea that receives data from AJAX call and it ends up looking like this: Hello& ...

Turn off the chrome react DevTools when deploying to production to ensure the

I have successfully browserified my react app for production using gulp and envify to set up NODE_ENV. This has allowed me to remove react warnings, error reporting in the console, and even disable some features like the require of react-addons-perf. Afte ...

Perform a Selenium action to click on each individual HTML 'a' tag on

I am attempting to automate clicking on all the "a" tags within a website using Selenium in Python. However, I found that all the "a" tags I want to click have the same structure as shown in the code snippet below. I tried clicking them by their class si ...

Guide to including a class within an "else" statement in JavaScript

function check_empty() { if (document.getElementById('CompanyName').value == "" || document.getElementById('ContactName').value == "" || document.getElementById('Address').value == "" || document.getElementById('PhoneNumb ...

Retrieving a specific Project ID from Asana Task API using Node.js and parsing the JSON response

Utilizing the Asana Task API, we have the capability to retrieve a task's associated projects along with their GID and Notes (description text). The main objective Our aim is to extract the GID of the project containing #websiteprojecttemplate in its ...

The page you're looking for is nowhere to be seen on the Angular Routing for Mobile View - it seems to have vanished into thin

After creating an angular app, I encountered an issue while using ng build --prod to build it for production and hosting. On the mobile view, every routing except the homepage displayed a 404 Page Not Found error. I am currently unable to determine the roo ...