Setting up a Site to Share on Social Media

To get your website to show previews correctly in Twitter, Facebook, and LinkedIn.

You can see how facebook views your page here: https://developers.facebook.com/tools/debug/
and twitter: https://cards-dev.twitter.com/validator
LinkedIn: https://www.linkedin.com/post-inspector/inspect/

Add this to your <head> tag (won’t work in <body>):
<meta property=”og:image” content=”http://url.to/preview/imageLocation.jpg” />
<meta property=”og:description” content=”Description of Conent” />
<meta property=”og:title” content=”Social Media Title” />
<meta name=”twitter:site” content=”@twitterhandle”> <meta name=”twitter:domain” content=”http://www.domain.com/”/>
<meta name=”twitter:card” content=”summary_large_image”>
<meta name=”twitter:image” content=”http://url.to/preview/imageLocation.jpg“> <meta name=”twitter:title” content=”Title for Twitter”>

You may want to have a place on your news page to upload an image (or 2) for social sharing then create images using this guide: https://makeawebsitehub.com/social-media-image-sizes-cheat-sheet/

Also, if you’ve got validation errors, it may not share correction on LinkedIn.

One thought on “Setting up a Site to Share on Social Media

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>