Comment On Post
comment_on_postPosts a comment on a LinkedIn post as the signed-in account, using the post permalink to verify the target before typing; set confirmation off to preview the post text.
Instructions
Comment on a LinkedIn post as the signed-in account.
The post is identified by its permalink, and the permalink alone decides
where the comment lands: the tool navigates there and refuses to type
unless the browser's own address is still that post. Pass a reference
exactly as get_feed, search_posts or get_company_posts returned it in
references. Note that search_posts appends permalinks without
aligning them to result order, so a permalink taken from a search must
be matched to the post you meant some other way before commenting: dry
run it first and read the excerpt back, which is the post's own
text from the page the comment would land on.
Only the post's own comment box is used, and only while it is the single comment box open on the page and already empty. Text someone else typed is never overwritten, and a reply to an existing comment is not reachable from here.
With confirm_comment False this is a read: it reports whether the post
accepts a comment from this account, hands back an excerpt of that
post's text, and returns dry_run without typing anything. This is a
write operation when confirm_comment is True.
Commenting is rate-limited by LinkedIn and automated commenting at volume is what account restrictions are for. Treat each call as a deliberate act the user asked for, not as a loop to run over a list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| post | Yes | The post's permalink or entity URN. Accepts ``urn:li:activity:…``, ``/feed/update/<urn>/``, ``/posts/<slug>`` and the full URL form of either. | |
| comment | Yes | Comment text. LF, CRLF and CR all end a line; an empty line separates paragraphs and is kept. Whitespace-only lines count as empty, and leading and trailing whitespace of the whole comment is removed, as LinkedIn does when posting. Tab, other control characters, DEL, U+0085, U+2028 and U+2029 are refused. | |
| confirm_comment | Yes | Must be True to post the comment |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||