List<Task> listTask = [select id, owner.
name, WhatId from task where id =
'00T9000002bd9m2EAA' and [Link] = 'Campaign'];
List<FeedItem> listFeedItem = new List<FeedItem>();
String salesforceHost = [Link]().toExternalForm();
for (Task tsk : listTask)
{
String url =
'[Link] + [Link]
+ '/feed-items';
HttpRequest req = new HttpRequest();
[Link]('POST');
[Link](url);
[Link]('Content-type', 'application/json');
[Link]('Authorization', 'OAuth ' + [Link]());
[Link]('{ "body" : { "messageSegments" : [ { "type": "mention", "id" : "'
+ [Link] + '" }, { "type": "text", "text" : "' + ' ' + 'hellow shoukat bhai'
+ '" } ] } }');
Http http = new Http();
HTTPResponse res = [Link](req);