title: Open Graph Protocol. How to detect if is Facebook
body: <p>On LinkedIn <a href="https://developer.linkedin.com/documents/setting-display-tags-shares" rel="nofollow">here</a> "image must be at least 80 x 150 pixels". On Facebook <a href="http://developers.facebook.com/docs/share/" rel="nofollow">here</a> image "cannot exceed 130x110 pixels". I want to use a php function to resize a thumbnail for Facebook or LinkedIn. </p>
  
  <p>How can I detect if is Facebook or LinkedIn when I share a link?</p>
  
  <p>EDIT(Details):</p>
  
  <p>When I paste a link to share it in Facebook or LinkedIn, they get the info that is in these tags inside the head of a html document:</p>
  
  <pre><code>&lt;meta property="og:url" content="..." /&gt;
  &lt;meta property="og:description" content="..." /&gt;
  &lt;meta property="og:image" content="image.jpg" /&gt;
  &lt;meta property="og:title" content="title" /&gt;
  &lt;meta property="og:type" content="website" /&gt;
  &lt;meta property="fb:app_id" content="id..." /&gt;
  &lt;meta property="og:locale" content="en_US" /&gt;
  </code></pre>
  
  <p>For the og:image part for LinkedIn if is smaller then dimensions mentioned it will ignore it, while for Facebook the maximum required is smaller then what LinkedIn wants, and on Facebook for a wrong picture it looks to display a image of their own by default. So I'm trying to detect if I share a link on Facebook or LinkedIn to resize appropriate</p>