0
votes

I have included opengraph tags on my page header like so:

<meta property="og:image" content="http://image1.jpg" />
<meta property="og:image" content="http://image2.jpg" />

Image 1 is also displayed in body tag and perhaps this causes image 1 to be grabbed again, producing duplicates in the Facebook Sharer. I thought only those images with og meta tags are supposed to appear. Facebook Debug Linter shows correctly only those two images. Any help?

1
Are you completely sure that these are the same image? Facebook cannot tell if different links pointing to the same file are the same image, and I don't believe they check the images themselves for duplicates. - Julian H. Lam
Yes, image1 is being grabbed again in the body tag, thus producing 3 sharer images. The links of the two image1's are identical. - Jay Na

1 Answers

0
votes

you should use the code to get image from the current page. Here is the code:

<meta property="og:image" content="<?php echo $image; ?>" />