html - How to share dynamic title and description for link shared on facebook? -


i tring share custom created link on facebook.meta data tag set working fine when custom title , description set when try dynamically change not working.

i tried angular js try nodejs tring render backend no luck.

// code nodejs reply.view(   'metadata',   {      title: 'my home page',     description: 'this test'    } );  // html code <html>    <head>      <meta property="og:title" content="{{title}}" />      <meta property="og:description" content ="{{description}}"/>    </head>    <body></body>  </html> 

use ejs instead of html node application: -
should use:-

<html>      <head>          <meta property="og:title" content="<%= title %>" />          <meta property="og:description" content ="<%= description %>"/>      </head>      <body></body>  </html> 

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -