How the summary, with imagery of a shared link gets generated in social media?
In the below example, the summary of the link https://twitter.com/sarbbottam/status/711069687774203904/photo/1 is shown as a snippet (highlighted).
On inspecting the highlighted area in devtools, it seems Facebook is generating the markup, may be with respect to the content at https://twitter.com/sarbbottam/status/711069687774203904/photo/1 (view-source)
<link rel="alternate" type="application/json+oembed" href="https://publish.twitter.com/oembed?url=https://twitter.com/sarbbottam/status/711069687774203904" title="$ąяββ๏ţţąʍ on Twitter: "Someone just requested @reactjs maintainer, to accept his PR over another, as he is 1 min faster. #HolyOpenSource">
Not only in Facebook, but I have seen it in twitter too, like if an youtube link is shared, the video player gets embedded along with the shared link.
Any pointer behind the mechanism/principle of generating the summary/snippet would be helpful.