What you have in the image isn't the achievement frame, it's a tooltip. Specifically
ItemRefTooltip.
Lua Code:
function ShowCustomTooltip(title,character,date,description)
-- Mimics SetItemRef() starting at ItemRef.lua:389
ShowUIPanel(ItemRefTooltip);
if not ItemRefTooltip:IsShown() then ItemRefTooltip:SetOwner(UIParent, "ANCHOR_PRESERVE"); end
-- Mimics :ItemRefSetHyperlink() at ItemRef.lua:791
ItemRefTooltip:SetPadding(0,0);
-- Custom Text (Replaces :SetHyperlink() at ItemRef.lua:793)
ItemRefTooltip:ClearLines();
ItemRefTooltip:AddLine(title,1,1,1);
ItemRefTooltip:AddLine(" ");
ItemRefTooltip:AddLine(("Achievement earned by %s on %s"):format(character,date),0,1,0);
if description then
ItemRefTooltip:AddLine(" ");
ItemRefTooltip:AddLine(description,1,1,1);
end
if ItemRefTooltipTextLeft1 and ItemRefTooltipTextLeft1:GetRight()-ItemRefTooltip.CloseButton:GetLeft()>0 then
ItemRefTooltip:SetPadding(16,0);
end
end
As for sending this through chat to another player, links are encoded with an achievement ID and the GUID of the player. Links of any type do not support custom data. You'll have to find your own way to encode and transmit this info and it'll require your addon on both ends.