Javascript 在aspx页面中,通过使用addthis进行社交共享,其中不共享图像、标题、描述数据,因此我添加了元标记,但不起作用

Javascript 在aspx页面中,通过使用addthis进行社交共享,其中不共享图像、标题、描述数据,因此我添加了元标记,但不起作用,javascript,facebook-social-plugins,add-this-event,Javascript,Facebook Social Plugins,Add This Event,我使用addthis插件,在facebook、twitter、linkedin、Whatsap中不共享数据,所以我添加了元标记,其中元标记共享静态内容,但aspx页面有dymanic post,其中数据通过API 我需要动态元标记,其中来自api的数据附加在元标记中 在facebook调试器中进行调试期间,它不会显示动态数据 这些是元标记 <meta name="twitter:title" content="Impact Of Labor Reforms

我使用addthis插件,在facebook、twitter、linkedin、Whatsap中不共享数据,所以我添加了元标记,其中元标记共享静态内容,但aspx页面有dymanic post,其中数据通过API

我需要动态元标记,其中来自api的数据附加在元标记中

在facebook调试器中进行调试期间,它不会显示动态数据

这些是元标记

 <meta name="twitter:title" content="Impact Of Labor Reforms On Ease Of Doing Business">
 <meta name="twitter:description" content="Already lots have been discussed about the migrant laborer’s and their difficulties, so delving deep into the solutions which the central government has come out with through the amendments in the labor laws as committed at the beginning of 2020.">
    <meta name="twitter:image" content="https://advantagehrm.com/Uploads/UploadImage/Img2b251f472-7a88-4110-8acd-4677aa461696.jpg" />   
    <meta name="twitter:image:src" content="https://advantagehrm.com/Uploads/UploadImage/Img2b251f472-7a88-4110-8acd-4677aa461696.jpg">
    <meta property="og:image:type" content="image/png">  
    <meta property="og:title" content="Impact Of Labor Reforms On Ease Of Doing Business">   
    <meta property="og:url" content="https://advantagehrm.com/PostMaster/DetailNews.aspx?id=69">
    <meta property="og:image" content="https://advantagehrm.com/Uploads/UploadImage/Img2b251f472-7a88-4110-8acd-4677aa461696.jpg" />
    <meta property="og:image:secure_url" content="https://advantagehrm.com/Uploads/UploadImage/Img2b251f472-7a88-4110-8acd-4677aa461696.jpg" />
    <meta property="og:description" content="Already lots have been discussed about the migrant laborer’s and their difficulties, so delving deep into the solutions which the central government has come out with through the amendments in the labor laws as committed at the beginning of 2020.">
    <meta property="fb:app_id" content="899581643899672"> 
 $(document).prop('title',getData[j].PostTitle);            
                             $('#divMeta').attr('data-title', getData[j].PostTitle);                                        
                            $('#divMeta').attr('data-description', getData[j].Description.substring(1,20));
                            $('#divMeta').attr('data-media','https://advantagehrm.com' + getData[j].PostImg.replace("~", ""));
                           
                           
                           $("meta[property='og\\:title']").attr('content',getData[j].PostTitle);   
                           $("meta[name='twitter\\:title']").attr('content',getData[j].PostTitle);
                           
                           
                           $("meta[name='twitter\\:image\\:src']").attr('content', 'https://advantagehrm.com' + getData[j].PostImg.replace("~", ""));
                           $("meta[name='twitter\\:image']").attr('content', 'https://advantagehrm.com' + getData[j].PostImg.replace("~", ""));
                           $("meta[property='og\\:image\\:secure_url']").attr('content','https://advantagehrm.com' + getData[j].PostImg.replace("~", ""));

看起来您正在使用javascript添加元标记。这是不好的,你需要在加载之前直接将它们添加到html中,以便Facebook获取,你可以使用你正在使用的语言(ASP、PHP)从服务器上执行或者直接在HTMLin这个页面中,帖子是按id加载的,数据来自api,这就是为什么我需要用javascript更新或附加数据我能理解什么,但它不起作用我能做什么,先生请告诉我