Enable developer console in browser and navigate to:
Look for the response of POST request in the network tab of developer console: https://www.facebook.com/v2.6/dialog/oauth/confirm?dpr=1 it contains the access token parameter. Just search for 'access_token' in the response. For the lazy people (like myself) i made a small helper that parses the token from response https://taseppa.github.io/tokenparser.github.io/
Thanks for reply but my ask is about a part of code that can click on "ok" button. It should look like a request with : "https://.facebook.com//dialog/oauth/confirm/" but I don't know rights data to send.
Your Firefox extension don't manage this task, it's only get the response of "https://.facebook.com//dialog/oauth/confirm/" post request