title: New Facebook Messenger Webview Not Working
body: <p>I've been trying out the new <a href="https://developers.facebook.com/docs/messenger-platform/webview" rel="nofollow noreferrer">Messenger Webview</a> that opens like a pop-up for URL instead of opening in a new tab.</p>
  
  <p>And I wrote a small script to get user id as per this <a href="https://developers.facebook.com/docs/messenger-platform/webview/userid" rel="nofollow noreferrer">documentation</a></p>
  
  <p>However, in Mobile apps, I'm able to get the user id. But opening on the website (both facebook.com/messages and messenger.com) it shows me an error: </p>
  
  <blockquote>
    <p>This SDK method is not supported on this Messenger client. Please
    upgrade.</p>
  </blockquote>
  
  <pre><code>&lt;body&gt;
    &lt;script&gt;
      (function(d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) {
          return;
        }
        js = d.createElement(s);
        js.id = id;
        js.src = "https://connect.facebook.com/en_US/messenger.Extensions.js";
        fjs.parentNode.insertBefore(js, fjs);
      }(document, 'script', 'Messenger'));
      window.extAsyncInit = function() {
        alert('loaded sdk');
      };
      function getUser() {
        MessengerExtensions.getUserID(function success(uids) {
          var psid = uids.psid;
          alert(JSON.stringify(psid));
        }, function error(err, errorMessage) {
          alert(JSON.stringify(errorMessage));
        });
      }
    &lt;/script&gt;
    &lt;input type="button" onclick="getUser()" value="Get user id" /&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Namco.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Namco.png" alt="enter image description here"></a></p>