title: Share dynamic image with Facebook based on URL parameters
body: <p>We have a site that we want users to share an image based on the results of their input. Basically a map with selected countries unique to them.</p>
  
  <p>We previously could do this using the sharer.php parameters up until about today but these now seem to have bitten the dust for good. They were due to be discontinued this month.</p>
  
  <p>Our alternative (hopefully someone has better!) is to set the og:image property for our home page (which is what we want linked on the FB post) dynamically based on the URL parameter. All seems straight-forward, however whenever we test share FB uses the standard image for the home page as if there is no URL parameter.</p>
  
  <p>Does anyone know definitively if FB uses the URL parameters when it crawls a site to get the image? Our tests seems to show they don't but if anyone knows a way around this I would be eternally grateful.</p>
  
  <p>FYI, here are the og tags so you can see how they're set dynamically. It's web2py but should make sense I hope:</p>
  
  <pre><code>&lt;meta property="og:url" content="{{=cfg.global_base_url + request.env.web2py_original_uri}}" /&gt;
  &lt;meta property="og:type" content="website" /&gt;
  &lt;meta property="og:title" content="{{=(cfg.global_strap_line +  ' | ' + cfg.global_app_name) if not response.title else response.title}}" /&gt;
  &lt;meta property="og:description" content="{{=cfg.global_open_graph_description if not response.description else response.description}}" /&gt;
  &lt;meta property="og:image" content="{{=cfg.global_share_image if not response.share_image else response.share_image}}" /&gt;
  &lt;meta property="og:locale" content="en_GB" /&gt;
  </code></pre>
  
  <p>Here's an example share URL: <a href="https://www.wherecani.live?pid=9d684d33-78ad-4f39-9010-458583dbfcef" rel="nofollow noreferrer">https://www.wherecani.live?pid=9d684d33-78ad-4f39-9010-458583dbfcef</a></p>
  
  <p>You can see in the HTML that the og:image relates to the URL parameter as expected.</p>