I'm trying to use the following to get an access token for a browser game I'm working on:
var queryString = window.location.hash.slice(1); var params = new URLSearchParams(queryString); var accessToken = params.get("access_token");
The problem is the queryString and params are empty and the accessToken is null. Is there something I need to set up before I use this code?