I need to tag a company/person in a LinkedIn post which is generated by code when I use the @name in the string which is posted to Linkedin then the post turns out to just pain text and not a tag to which the person is informed.
Yes, it is possible to mention organisations or people within a share. You can do this by adding the annotations parameter for every organisation or person you want to mention. For example:
{
"annotations": [
{
"entity": "urn:li:organization:1337",
"length": 8,
"start": 6
}
],
"text": "Hello LinkedIn world!"
}
You can read more about sharing an update and mentioning in the LinkedIn doc's here: https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/share-api#share-text-and-mentions.