How to add a hyperlink in the body of a feeditem using apex class?
FeedItem in salesforce as its represents an entry in the feed, such as changes in a record feed, including text posts, link posts, and content posts.
//Adding a Link in FeedItem
FeedItem linkItem = new FeedItem();
linkItem.ParentId = oId; //eg. Account id, Contact Id, Opportunity id, Custom object id, etc
linkItem.Title = ‘TheBlogReaders.com’;
linkItem.LinkUrl = ‘http://www.theblogreaders.com’;
See the Screenshot: