my dynamic data not share in fb using angular

Discussão em 'Angular' iniciado por Bhargav Chudasama, Maio 12, 2025.

  1. i have tried to share my post page data to fb, and my post page data change on product wise, its come from server and after that i want to share this data on fb, but i cant get this data on fb share page.

    i tried below concept for share data on fb

    1. ngx-social-button

    2. let url = "https://www.facebook.com/dialog/share?app_id=xxxxxxxxx&href="+location.href+"&picture="+this.product.productImageUrl;
      let newwindow=window.open(url,'name','height=500,width=520,top=200,left=300,resizable');
      if (window.focus) {
      newwindow.focus()
      }

    and update meta dynamic when post data come

    this.metaService.updateTag({property: 'og:title', content: product.productName});
    this.metaService.updateTag({property: 'og:type', content: 'website'});
    this.metaService.updateTag({property: 'og:image', content: product.productImageUrl});
    this.metaService.updateTag({property: 'og:image:alt', content: product.productName});
    this.metaService.updateTag({property: 'og:description', content: product.productDescription});
    this.metaService.updateTag({property: 'og:url', content: location.href});
    this.metaService.updateTag({property: 'og:image:height', content:'250px'});
    this.metaService.updateTag({property: 'og:image:width', content:'250px'});


    but i cant resolve issue for share dynamic data on fb

    Continue reading...

Compartilhe esta Página