Link image preview issue

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Is there a way to fix the preview of the link when posting it in the facebook? it seems the og:image should be exist but Nopcommerce doesn't support this. Please advise how to fix this?
3 years ago
Step 1) In nop 3.9 add this code to YOURTHEME/views/catalog/CategoryTemplate.ProductsInGridOrLines.cshtml
...
  Html.AddHeadCustomParts("<meta property=\"og:type\" content=\"product\" />");
Html.AddHeadCustomParts("<meta property=\"og:title\" content=\"" + Model.Name + "\" />");
  Html.AddHeadCustomParts("<meta property=\"og:description\" content=\"" + Model.MetaDescription + "\" />");
  Html.AddHeadCustomParts("<meta property=\"og:image\" content=\"" + (Model.PictureModel) + "\" />");
  Html.AddHeadCustomParts("<meta property=\"og:url\" content=\"" + Request.Url.AbsoluteUri + "\" />");
...
and so on

Step 2) In YOURTHEME/views/shared/_root.head.cshtml add this code inside head tag
<meta property="fb:app_id" content="xxxxxxxxxxxxxx" />

Step 3) In YOURTHEME/views/home/index.cshtml add this code
...
        Html.AddMetaDescriptionParts("YOURDESC");
  Html.AddMetaKeywordParts("YOURKEYWORD");
  Html.AddHeadCustomParts("<meta property=\"og:type\" content=\"product\" />");
...
and so on

check this example website https://www.allboomm.com/
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.