I have angular 4 web application. Where I need to share some post to linked in with URL containing thumbnail preview.
What I did is: Am using the static meta infromation for index.html page & while navigating to another page, i am updating meta information. from that page i am sharing post to linkedin. Successfully able to share the url with og:image but the thumbnail preview contains og:image from main index.html.
Below is index.html meta information:
<meta name="title" property="og:title" content="Title Example">
<meta property="og:type" content="Article">
<meta name="image" property="og:image" content="[Image URL here]">
<meta name="description" property="og:description" content="Description Example">
<meta name="author" content="Example">
Below is code is to update meta information for Share.html
this.meta.updateTag({ prefix: 'og: http://ogp.me/ns#' , name: 'title', content: 'Title Example Badge'});
this.meta.addTag({ prefix: 'og: http://ogp.me/ns#' , name: 'description', content: 'Badge Description '});
this.meta.updateTag({ prefix: 'og: http://ogp.me/ns#' , property: 'og:image', content: this.imageURL, itemprop: 'image' });
this.meta.updateTag({ prefix: 'og: http://ogp.me/ns#' , property: 'og:image:type', content: 'image/png' });
this.meta.updateTag({ prefix: 'og: http://ogp.me/ns#' , property: 'og:url', content: this.routerUrl , itemprop: 'url' });
What I want is: I want to share the URL with updated meta information & og:image.