Unfortunately LinkedIn is very strict when it comes to this, but we will continue to ask and monitor the API to improve this feature whenever we can.
For publishing personal posts where you want to mention others, our recommendation is to go to the post once published on LinkedIn and apply the mentions there. If publishing from collaborate, simply click the "Go to post" button and edit the post directly on LinkedIn.
Just remember, do not spam others by over-mentioning and if people who are mentioned do not respond to your post your reach will be punished.
So, for the rules that applies to mentioning, read below.
The API only allows to mention people in business page posts, and then there are a bunch of conditions that has to be met:
Search by keyword returns up to 10 profiles matching the first few characters of first or last name.
Search response contains member basic profile information and unique member identifier.
Search by vanity URL returns member identifier corresponding to the vanity name.
Search response contains only members that are followers of the company.
The input is case insensitive.
Multiple words should be joined using a space. Since you need to encode the input URL, this translates to %20. For example, Andrew%20Clark.
Wildcards and Boolean logic are not supported (for example: *, ?, AND, and OR).
Numeric characters not allowed.
Special characters allowed: space(“ “), apostrophe(“`”), hyphen(“-”), dot(“.”), all other non alpha-numeric special characters not allowed.
No two special character in succession allowed - for example two spaces next to each other, a space and apostrophe next to each other is not allowed
Minimum length of 3 characters if no special characters
Only one space character allowed
If dot and/or space is present, minimum of 6 characters required including the special character.
Supports en_US locale only, which means that the person needs to have LinkedIn language in US english.