Detect if "send to messenger" button is loaded (Facebook Messenger)
<p>After looking around for a long time I decided to ask you directly. 
I'm looking for a way of detecting if the "Send to messenger" button is loaded or not. We are currently testing our new Messenger bot and would love to have the option of showing the button on our site if a person is a tester and otherwise show a button for "test out our beta" that links to a form. </p>

<p>The button is not loaded unless a user is an admin or tester of the app. I tried doing it with trim and length in javascript. However the script actually loads content inside the div. </p>

<p>Here's how the code looks static: </p>

<pre><code>&lt;div class="fb-send-to-messenger" 
  messenger_app_id="APP_ID" 
  page_id="PAGE_ID" 
  data-ref="PASS_THROUGH_PARAM" 
  color="blue" 
  size="standard"&gt;
&lt;/div&gt;  
</code></pre>

<p>And in incognito it loads an iframe with an empty html doc inside. </p>

<p>What annoys me is that the div actually has a <strong>fb-xfbml-state="rendered"</strong> state even if it's not loaded. </p>

<p>Is there any other way I could do this? I've been looking through the Facebook docs for a way of determening outside of that script if a user has an active session or not, but haven't found anything? </p>