title: Get page id of any Facebook page
body: <p>I need to get the id of a Facebook page. I've found an online tool: <a href="https://findmyfbid.com/" rel="nofollow noreferrer">https://findmyfbid.com/</a> - but I need it to work programmatically and I have no idea how that tool works behind the curtains.</p>
  
  <p>I have noticed that Facebook exposes the id in the page source in numerous places, especially inline JS. The best thing I have found are meta tags:</p>
  
  <pre><code>&lt;meta property="al:android:url" content="fb://page/11239244970?referrer=app_link" /&gt;
  </code></pre>
  
  <p>That's from StackOverflow FB page. This would be good for now, but it seems very hacky and I have no idea how long will it persist.</p>
  
  <p>Is there a better way to do it?</p>