title: Facebook scraper not being able to recognize a mysql query for a Share Button
body: <p>I have been trying to implement a Facebook share button on my site and I have a handful of doubts, but I am going to post them in different posts to try to crystalize specific problems that I am finding. 
    Most of my site’s content is dynamically generated by users input and information stored on the database. I am currently working with a test file that has been stripped off of most of the stuff in order to clear off the noise and identify what is going wrong when Facebook scrapes my URL. </p>
  
  <p>This is my code</p>
  
  <pre><code>&lt;?php
      $id=$session-&gt;user_id;
      $user=User::find_by_id($id); 
  ?&gt;
  
      &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Title&lt;/title&gt;
  
  
          &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/&gt;
  
          &lt;!-- Open Graph meta tags --&gt;
          &lt;meta property ="fb:app_id"         content="123465"/&gt;
          &lt;meta property="og:url"             content="http://www.example.com/share_test.php" /&gt;
          &lt;meta property="og:type"            content="website" /&gt;
          &lt;meta property="og:title"           content="&lt;?php echo $user-&gt;first_name; ?&gt;" has done something. /&gt;
          &lt;meta property="og:description"     content="This is what &lt;?php echo-&gt; $user-&gt;first_name; ?&gt; did." /&gt;
          &lt;meta property="og:image"           content="http://www.example/image.jpg" /&gt;
  
      &lt;/head&gt;
      &lt;body&gt;
  
      &lt;!-- Inclusion of Facebook Javascript SDK and share button function here--&gt;
  
      &lt;p&gt;&lt;?php echo $user-&gt;first_name; ?&gt; has done something&lt;/p&gt;
          &lt;img src="image.jpg"&gt;
  
      &lt;div class="fb-share-button" 
          data-href="http://www.example.com/share_test.php" 
          data-layout="button_count"&gt;
      &lt;/div&gt;
  
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I have noticed when I include certain PHP functions at the top of the file, the Debugger tool is stating that Facebook is not recognizing certain OG properties even though they are stated on my file. When click on the “See exactly what our scraper sees for your URL” there is a Database query failure. So the mysql query that goes with <code>$user=User::find_by_id($id)</code> can’t be done by Facebook scraper (my site is performing the call with no problem). Does anybody has any insight of how to work around this issue?
  Thanks in advance.</p>