title: Facebook scraper not seeing Opengrapth Meta Tags on shop products using PHP and Mysql
body: <p>I really hope someone on this site can help me with this problem, I have been looking for days now but just can't find a solution.</p>
  
  <p>I have an e-commerce website containing 100's of products and I am trying to put a Facebook share button on each product. I display each individual item through single.php and access this file with single.php?pid=52 for example which comes from a product page. </p>
  
  <p>At the beginning of 'single.php' I have as follows:</p>
  
  <pre><code>$file1 = $pid . ".php"; // a reference to a file containing relevant Open 
  Graph metadata which is stored on the server
  
  $metadata = glob('images/products/metadata/'. $file1); // Gets the filename from the server a puts it in to an array $metadata[0];
  ?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
  &lt;title&gt;wish Interiors&lt;/title&gt;
  &lt;link rel="canonical" href="https://wishinteriors.com/single.php"&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  &lt;meta name="keywords" content="" &gt;
  &lt;meta name="description" content="At Wish Interiors, all our reproduction furniture are handmade using the finest craftsmen and quality workmanship so you are sure to get a luxury handmade piece of furniture every time."&gt;
  &lt;!--FACEBOOK--&gt;
  &lt;?php
  require $metadata[0];
  
  require "includes/header-single.php"; // this contains the rest of the header data 
  </code></pre>
  
  <p>The metadata file contains as follows:</p>
  
  <pre><code>&lt;meta property="og:title" content="Bespoke furniture makers" /&gt;
  &lt;meta property="og:site_name" content="Wish Interiors" /&gt;
  &lt;meta property="og:url" content="https://wishinteriors.com/single.php" /&gt;
  &lt;meta property="og:description" content="At Wish Interiors, all our 
  reproduction furniture are handmade using the finest craftsmen and quality 
  workmanship so you are sure to get a luxury handmade piece of furniture every 
  time." /&gt;
  &lt;meta property="fb:app_id" content="" /&gt;
  &lt;meta property="og:type" content="website" /&gt;
  &lt;meta property="og:locale" content="en-US" /&gt;
  &lt;meta property="og:image" 
  content="https://wishinteriors.com/images/products/Fillipo%203seater.jpg" /&gt;
  </code></pre>
  
  <p>The %20 in the image file name is there because it has spaces in the name, I did a test and the scraper seemed to accept this method.</p>
  
  <p>The problem is that facebook scraper just refuses to see the Open Graph data, even though I can see it fine if a do a view source for the browse. What I would like to know, is there an alternative way of doing this or even is it possible at all to have dynamic data sent to the scraper, or do I have to physically have a page for each product containing the header data and product information.</p>