How to make website look nice when it’s embedded as link on social networks pages(at least at Facebook). Can’ find any information on the subject matter. Does this require interaction with social networks api or something?
Especially when it’s not via share button, but just copy past of link
3
Answers
Every social network has its own API specification while sharing the link. For e.g, twitter provides summary card with large feature while sharing the website or article. https://dev.twitter.com/cards/types/summary-large-image
You can put custom markup in the
<head>
of your site to influence what shows up when the link is embedded on Facebook.Here’s an example:
Check out the documentation at https://developers.facebook.com/docs/sharing/webmasters.
You need to set proper
metadata
(e.g.<meta property="og:title" content="The Rock" />
) to make your web page appear rich object in social media such as Facebook.Extracted from from ogp.me
While, the meta
name
can be different for different social media websites, for instance, Twitter has Cards for its tweets.So you can use, Twitter Cards and Open Graph Protocol to leverage rich content preview.