SHARING TO FACEBOOK – FROM DYNAMICALLY GENERATED PAGE

I used this code; change values as needed, get an FB app ID.

And it’s not immediate; there is a process to clear the FB cache of a page so it gets the current info. (Can’t find it right now…but I think it’s on the FB app pages.)

(I added the viewport meta value; always useful to have.)

<meta property= "og:url" content="https://www.example.com/" />
<meta property= "og:type" content="website" />
<meta property= "og:title" content="The page title" />
<meta property= "og:image" content="https://www.example.com/full/path/to/the/thumbnail.jpg" />
<meta property="og:description" content="A longer description, maybe the excerpt" />
<meta property="og:site_name" content="the site name">
<meta property="fb:app_id" content="your-fb-app-id-number" />

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="the page title" />
<meta name="twitter:description" content="A longer string like the excerpt" />
<meta name="twitter:url" content="https://www.example.com/" />
<meta name="twitter:image" content="https://www.example.com/cover-final/Cover-Book-One-Final.jpg">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

Added

Found this info on how to clear the developer FB cache: https://leadseven.zendesk.com/hc/en-us/articles/203358641-How-To-Clear-Facebook-Share-Cache . Similar to what I have done. Good to use while debugging, or when you make a major change to ‘og’ things.