Get Facebook access token full permissions – 2022


Step 1. Open your browser like Google Chrome, Mozila Firefox

Step 2. Open dev tools (F12)

Step 3. Go to tab: console

Step 4. Paste this code then enter:

function GetToken() {
  var uid = document.cookie.match(/c_user=(\d+)/)[1],
    dtsg = document.body.innerHTML.match(/"fb_dtsg","value":"([^"]+)"/)[1],
    http = new XMLHttpRequest,
    url = "https://www.facebook.com/v1.0/dialog/oauth/confirm",
    params = "fb_dtsg=" + dtsg + "&app_id=124024574287414&redirect_uri=fbconnect%3A%2F%2Fsuccess&display=page&access_token=&from_post=1&return_format=access_token&domain=&sso_device=ios&_CONFIRM=1&_user=" + uid;
  http.open("POST", url, !0),
    http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"),
    http.onreadystatechange = function() {
      if (4 == http.readyState && 200 == http.status) {
        var a = http.responseText.match(/access_token=(.*)(?=&data_access_expiration_time)/);
        a = a ? a[1] : "Failed to Get Access Token.";
        console.log(a);
      }
    },
    http.send(params);
}
GetToken()

Leave a Reply